diff options
Diffstat (limited to 'doc')
568 files changed, 4683 insertions, 1855 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index b25de3cf99..7c863a3563 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="@GlobalScope" category="Core" version="3.2"> +<class name="@GlobalScope" version="4.0"> <brief_description> Global scope constants and variables. </brief_description> @@ -42,8 +42,13 @@ <member name="JSON" type="JSON" setter="" getter=""> The [JSON] singleton. </member> + <member name="JavaClassWrapper" type="JavaClassWrapper" setter="" getter=""> + The [JavaClassWrapper] singleton. + [b]Note:[/b] Only implemented on Android. + </member> <member name="JavaScript" type="JavaScript" setter="" getter=""> The [JavaScript] singleton. + [b]Note:[/b] Only implemented on HTML5. </member> <member name="Marshalls" type="Reference" setter="" getter=""> The [Marshalls] singleton. @@ -879,7 +884,7 @@ Ctrl key mask. </constant> <constant name="KEY_MASK_CMD" value="268435456" enum="KeyModifierMask"> - Cmd key mask. + Command key mask. On macOS, this is equivalent to [constant KEY_MASK_META]. On other platforms, this is equivalent to [constant KEY_MASK_CTRL]. This mask should be preferred to [constant KEY_MASK_META] or [constant KEY_MASK_CTRL] for system shortcuts as it handles all platforms correctly. </constant> <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask"> Keypad key mask. @@ -1162,10 +1167,10 @@ Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.: [codeblock] var err = method_that_returns_error() - if (err != OK): + if err != OK: print("Failure!) # Or, equivalent: - if (err): + if err: print("Still failing!) [/codeblock] </constant> @@ -1449,7 +1454,7 @@ Default method flags. </constant> <constant name="TYPE_NIL" value="0" enum="Variant.Type"> - Variable is of type [Nil] (only applied for [code]null[/code]). + Variable is [code]null[/code]. </constant> <constant name="TYPE_BOOL" value="1" enum="Variant.Type"> Variable is of type [bool]. diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 61e1ea9b8d..3f2f27d121 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AABB" category="Built-In Types" version="3.2"> +<class name="AABB" version="4.0"> <brief_description> Axis-Aligned Bounding Box. </brief_description> @@ -43,7 +43,7 @@ <return type="float"> </return> <description> - Gets the area of the [AABB]. + Returns the volume of the [AABB]. </description> </method> <method name="get_endpoint"> @@ -66,7 +66,7 @@ <return type="int"> </return> <description> - Returns the index of the longest axis of the [AABB] (according to [Vector3]::AXIS* enum). + Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants). </description> </method> <method name="get_longest_axis_size"> @@ -182,6 +182,7 @@ <argument index="0" name="aabb" type="AABB"> </argument> <description> + Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="merge"> @@ -190,13 +191,13 @@ <argument index="0" name="with" type="AABB"> </argument> <description> - Returns a larger AABB that contains this AABB and [code]with[/code]. + Returns a larger [AABB] that contains both this [AABB] and [code]with[/code]. </description> </method> </methods> <members> <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - Ending corner. + Ending corner. This is calculated as [code]position + size[/code]. Changing this property changes [member size] accordingly. </member> <member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> Beginning corner. diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml index 2177ed8930..87181f572d 100644 --- a/doc/classes/ARVRAnchor.xml +++ b/doc/classes/ARVRAnchor.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.2"> +<class name="ARVRAnchor" inherits="Spatial" version="4.0"> <brief_description> An anchor point in AR space. </brief_description> <description> - The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. + The [ARVRAnchor] point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on 0,0,0 until a plane is recognized. Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view. </description> @@ -29,7 +29,7 @@ <return type="Mesh"> </return> <description> - If provided by the ARVR Interface, this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes. + If provided by the [ARVRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes. </description> </method> <method name="get_plane" qualifiers="const"> diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml index 1c468f193f..a571d26c83 100644 --- a/doc/classes/ARVRCamera.xml +++ b/doc/classes/ARVRCamera.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ARVRCamera" inherits="Camera" category="Core" version="3.2"> +<class name="ARVRCamera" inherits="Camera" version="4.0"> <brief_description> A camera node with a few overrules for AR/VR applied, such as location tracking. </brief_description> @@ -8,6 +8,7 @@ The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the ARVR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index 9c6cfc1d7d..e485bd6f1a 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ARVRController" inherits="Spatial" category="Core" version="3.2"> +<class name="ARVRController" inherits="Spatial" version="4.0"> <brief_description> A spatial node representing a spatially-tracked controller. </brief_description> @@ -9,6 +9,7 @@ The position of the controller node is automatically updated by the [ARVRServer]. This makes this node ideal to add child nodes to visualize the controller. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="get_controller_name" qualifiers="const"> @@ -22,7 +23,7 @@ <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this controller, if known. See [code]TRACKER_*[/code] constants in [ARVRPositionalTracker]. + Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand]. </description> </method> <method name="get_is_active" qualifiers="const"> @@ -61,7 +62,7 @@ <argument index="0" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if the button at index [code]button[/code] is pressed. + Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoystickList], in particular the [code]JOY_VR_*[/code] constants. </description> </method> </methods> @@ -73,7 +74,8 @@ When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off. </member> <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0"> - The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. + The degree to which the controller vibrates. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. + This is a useful property to animate if you want the controller to vibrate for a limited duration. </member> </members> <signals> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index 1da1351e49..d9757ad023 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ARVRInterface" inherits="Reference" category="Core" version="3.2"> +<class name="ARVRInterface" inherits="Reference" version="4.0"> <brief_description> Base class for an AR/VR interface implementation. </brief_description> @@ -8,6 +8,7 @@ Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through [ARVRServer]. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="get_camera_feed_id"> @@ -21,7 +22,7 @@ <return type="int"> </return> <description> - Returns a combination of flags providing information about the capabilities of this interface. + Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface. </description> </method> <method name="get_name" qualifiers="const"> @@ -51,9 +52,9 @@ <description> Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. - [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. - If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. - While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. + [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. + If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different. + While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. </description> </method> <method name="is_stereo"> @@ -73,13 +74,13 @@ </methods> <members> <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false"> - On an AR interface, is our anchor detection enabled? + On an AR interface, [code]true[/code] if anchor detection is enabled. </member> <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false"> - Has this interface been initialized? + [code]true[/code] if this interface been initialized. </member> <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false"> - Is this our primary interface? + [code]true[/code] if this is the primary interface. </member> </members> <constants> @@ -93,10 +94,10 @@ This interface supports stereoscopic rendering. </constant> <constant name="ARVR_AR" value="4" enum="Capabilities"> - This interface support AR (video background and real world tracking). + This interface supports AR (video background and real world tracking). </constant> <constant name="ARVR_EXTERNAL" value="8" enum="Capabilities"> - This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. + This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. </constant> <constant name="EYE_MONO" value="0" enum="Eyes"> Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. @@ -111,7 +112,7 @@ Tracking is behaving as expected. </constant> <constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status"> - Tracking is hindered by excessive motion, player is moving faster than tracking can keep up. + Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up). </constant> <constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status"> Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. @@ -120,7 +121,7 @@ We don't know the status of the tracking or this interface does not provide feedback. </constant> <constant name="ARVR_NOT_TRACKING" value="4" enum="Tracking_status"> - Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.) + Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.). </constant> </constants> </class> diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml index b6b55741aa..9a386fd154 100644 --- a/doc/classes/ARVROrigin.xml +++ b/doc/classes/ARVROrigin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ARVROrigin" inherits="Spatial" category="Core" version="3.2"> +<class name="ARVROrigin" inherits="Spatial" version="4.0"> <brief_description> The origin point in AR/VR. </brief_description> @@ -10,6 +10,7 @@ For example, if your character is driving a car, the ARVROrigin node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml index 5551d48a08..a151f8d652 100644 --- a/doc/classes/ARVRPositionalTracker.xml +++ b/doc/classes/ARVRPositionalTracker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.2"> +<class name="ARVRPositionalTracker" inherits="Object" version="4.0"> <brief_description> A tracked object. </brief_description> @@ -9,13 +9,14 @@ The [ARVRController] and [ARVRAnchor] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="get_hand" qualifiers="const"> <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this tracker, if known. See [code]TRACKER_*[/code] constants. + Returns the hand holding this tracker, if known. See [enum TrackerHand] constants. </description> </method> <method name="get_joy_id" qualifiers="const"> diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index b71a18858f..6f0e4488fa 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ARVRServer" inherits="Object" category="Core" version="3.2"> +<class name="ARVRServer" inherits="Object" version="4.0"> <brief_description> - The AR/VR server. + Server for AR and VR features. </brief_description> <description> - The AR/VR server is the heart of our AR/VR solution and handles all the processing. + The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link> </tutorials> <methods> <method name="center_on_hmd"> @@ -47,14 +48,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Gets the interface registered at a given index in our list of interfaces. + Returns the interface registered at a given index in our list of interfaces. </description> </method> <method name="get_interface_count" qualifiers="const"> <return type="int"> </return> <description> - Gets the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code]. + Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code]. </description> </method> <method name="get_interfaces" qualifiers="const"> @@ -68,25 +69,28 @@ <return type="int"> </return> <description> + Returns the absolute timestamp (in μs) of the last [ARVRServer] commit of the AR/VR eyes to [VisualServer]. The value comes from an internal call to [method OS.get_ticks_usec]. </description> </method> <method name="get_last_frame_usec"> <return type="int"> </return> <description> + Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method get_last_process_usec] when committing. </description> </method> <method name="get_last_process_usec"> <return type="int"> </return> <description> + Returns the absolute timestamp (in μs) of the last [ARVRServer] process callback. The value comes from an internal call to [method OS.get_ticks_usec]. </description> </method> <method name="get_reference_frame" qualifiers="const"> <return type="Transform"> </return> <description> - Gets the reference frame transform. Mostly used internally and exposed for GDNative build interfaces. + Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces. </description> </method> <method name="get_tracker" qualifiers="const"> @@ -95,19 +99,20 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Gets the positional tracker at the given ID. + Returns the positional tracker at the given ID. </description> </method> <method name="get_tracker_count" qualifiers="const"> <return type="int"> </return> <description> - Gets the number of trackers currently registered. + Returns the number of trackers currently registered. </description> </method> </methods> <members> <member name="primary_interface" type="ARVRInterface" setter="set_primary_interface" getter="get_primary_interface"> + The primary [ARVRInterface] currently bound to the [ARVRServer]. </member> <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0"> Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 6304bd34f6..ccbb033444 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AStar" inherits="Reference" category="Core" version="3.2"> +<class name="AStar" inherits="Reference" version="4.0"> <brief_description> An implementation of A* to find shortest paths among connected points in space. </brief_description> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 3002e3c351..d620ef2a79 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AStar2D" inherits="Reference" category="Core" version="3.2"> +<class name="AStar2D" inherits="Reference" version="4.0"> <brief_description> - AStar class representation that uses 2d-vectors as edges. + AStar class representation that uses 2D vectors as edges. </brief_description> <description> This is a wrapper for the [AStar] class which uses 2D vectors instead of 3D vectors. diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 8acaaa4819..b0b9c155bb 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AcceptDialog" inherits="WindowDialog" category="Core" version="3.2"> +<class name="AcceptDialog" inherits="WindowDialog" version="4.0"> <brief_description> Base dialog for user notification. </brief_description> diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index 10ee4222c8..ff56067cda 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimatedSprite" inherits="Node2D" category="Core" version="3.2"> +<class name="AnimatedSprite" inherits="Node2D" version="4.0"> <brief_description> Sprite node that can use multiple textures for animation. </brief_description> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index eac5822d53..e24119c6c7 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.2"> +<class name="AnimatedSprite3D" inherits="SpriteBase3D" version="4.0"> <brief_description> 2D sprite node in 3D world, that can use multiple 2D textures for animation. </brief_description> diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index 5c43ce4d74..d4c25049d2 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimatedTexture" inherits="Texture" category="Core" version="3.2"> +<class name="AnimatedTexture" inherits="Texture" version="4.0"> <brief_description> Proxy texture for simple frame-based animations. </brief_description> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 97da8c9980..c3d9216657 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Animation" inherits="Resource" category="Core" version="3.2"> +<class name="Animation" inherits="Resource" version="4.0"> <brief_description> Contains data used to animate everything in the engine. </brief_description> @@ -656,7 +656,7 @@ <argument index="1" name="mode" type="int" enum="Animation.UpdateMode"> </argument> <description> - Sets the update mode ([code]UPDATE_*[/code]) of a value track. + Sets the update mode (see [enum UpdateMode]) of a value track. </description> </method> </methods> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index b4288bbfaa..331a30bd9e 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNode" inherits="Resource" category="Core" version="3.2"> +<class name="AnimationNode" inherits="Resource" version="4.0"> <brief_description> Base resource for [AnimationTree] nodes. </brief_description> @@ -8,6 +8,7 @@ Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_input"> @@ -16,7 +17,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree] + Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree]. </description> </method> <method name="blend_animation"> @@ -33,7 +34,7 @@ <argument index="4" name="blend" type="float"> </argument> <description> - Blend an animation by "blend" amount (name must be valid in the linked [AnimationPlayer]). A time and delta mas be passed, as well as whether seek happened. + Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened. </description> </method> <method name="blend_input"> @@ -52,7 +53,7 @@ <argument index="5" name="optimize" type="bool" default="true"> </argument> <description> - Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. Time is a delta, unless "seek" is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed. + Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options). </description> </method> <method name="blend_node"> @@ -164,10 +165,9 @@ <argument index="1" name="seek" type="bool"> </argument> <description> - Called when a custom node is processed. The argument "time" is relative, unless "seek" is [code]true[/code] (in which case it is absolute). - Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. - You can also use [method get_parameter] and [method set_parameter] to modify local memory. - This function returns the time left for the current animation to finish (if unsure, just pass the value from the main blend being called). + User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. + Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory. + This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called). </description> </method> <method name="remove_input"> @@ -204,7 +204,7 @@ </methods> <members> <member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled"> - Returns whether filtering is enabled. + If [code]true[/code], filtering is enabled. </member> </members> <signals> diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index bb7857717d..48983a624e 100644 --- a/doc/classes/AnimationNodeAdd2.xml +++ b/doc/classes/AnimationNodeAdd2.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeAdd2" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeAdd2" inherits="AnimationNode" version="4.0"> <brief_description> Blends two animations additively inside of an [AnimationNodeBlendTree]. </brief_description> @@ -7,6 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index d338c2cf9e..1bfebc91fc 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeAdd3" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeAdd3" inherits="AnimationNode" version="4.0"> <brief_description> Blends two of three animations additively inside of an [AnimationNodeBlendTree]. </brief_description> @@ -11,6 +11,7 @@ - A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index a964877068..369969a2d4 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeAnimation" inherits="AnimationRootNode" category="Core" version="3.2"> +<class name="AnimationNodeAnimation" inherits="AnimationRootNode" version="4.0"> <brief_description> Input animation to use in an [AnimationNodeBlendTree]. </brief_description> @@ -7,6 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index cac97b9ee7..2b56167225 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeBlend2" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeBlend2" inherits="AnimationNode" version="4.0"> <brief_description> Blends two animations linearly inside of an [AnimationNodeBlendTree]. </brief_description> @@ -7,6 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index 3b5c1f0b99..5a306a225d 100644 --- a/doc/classes/AnimationNodeBlend3.xml +++ b/doc/classes/AnimationNodeBlend3.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeBlend3" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeBlend3" inherits="AnimationNode" version="4.0"> <brief_description> Blends two of three animations linearly inside of an [AnimationNodeBlendTree]. </brief_description> @@ -11,6 +11,7 @@ - A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index 82d5716ee3..6e82f0afb7 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -1,15 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" category="Core" version="3.2"> +<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" version="4.0"> <brief_description> Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis. </brief_description> <description> A resource to add to an [AnimationNodeBlendTree]. This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point]. - Outputs the linear blend of the two [code]AnimationNode[/code] closest to the node's current [code]value[/code]. + Outputs the linear blend of the two [AnimationNode]s closest to the node's current value. You can set the extents of the axis using the [member min_space] and [member max_space]. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_blend_point"> @@ -22,7 +23,7 @@ <argument index="2" name="at_index" type="int" default="-1"> </argument> <description> - Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. + Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> @@ -38,7 +39,7 @@ <argument index="0" name="point" type="int"> </argument> <description> - Returns the [code]AnimationNode[/code] referenced by the point at index [code]point[/code]. + Returns the [AnimationNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> @@ -67,7 +68,7 @@ <argument index="1" name="node" type="AnimationRootNode"> </argument> <description> - Changes the AnimationNode referenced by the point at index [code]point[/code]. + Changes the [AnimationNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="set_blend_point_position"> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index d8ea7fea5b..f8680ba8ec 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" category="Core" version="3.2"> +<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" version="4.0"> <brief_description> - Blends linearly between three [AnimationNode] of any type placed in a 2d space. + Blends linearly between three [AnimationNode] of any type placed in a 2D space. </brief_description> <description> A resource to add to an [AnimationNodeBlendTree]. @@ -9,6 +9,7 @@ You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_blend_point"> @@ -21,7 +22,7 @@ <argument index="2" name="at_index" type="int" default="-1"> </argument> <description> - Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. + Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. </description> </method> <method name="add_triangle"> @@ -36,7 +37,7 @@ <argument index="3" name="at_index" type="int" default="-1"> </argument> <description> - Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. + Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> @@ -52,7 +53,7 @@ <argument index="0" name="point" type="int"> </argument> <description> - Returns the [code]AnimationRootNode[/code] referenced by the point at index [code]point[/code]. + Returns the [AnimationRootNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> @@ -108,7 +109,7 @@ <argument index="1" name="node" type="AnimationRootNode"> </argument> <description> - Changes the AnimationNode referenced by the point at index [code]point[/code]. + Changes the [AnimationNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="set_blend_point_position"> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index 76a0d65920..5a86af6865 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" category="Core" version="3.2"> +<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_node"> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index 099548f60a..b6e4ed9c98 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeOneShot" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="get_mix_mode" qualifiers="const"> diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml index bfe28319c6..f4bded2cd1 100644 --- a/doc/classes/AnimationNodeOutput.xml +++ b/doc/classes/AnimationNodeOutput.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeOutput" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 9a21492b8a..39a9af5ead 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" category="Core" version="3.2"> +<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" version="4.0"> <brief_description> State machine for control of animations. </brief_description> <description> - Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the [AnimationTree] node to control it programmatically. + Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically. [b]Example:[/b] [codeblock] var state_machine = $AnimationTree.get("parameters/playback") @@ -12,6 +12,7 @@ [/codeblock] </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_node"> @@ -159,7 +160,7 @@ <argument index="1" name="to" type="String"> </argument> <description> - Deletes the given transition. + Deletes the transition between the two specified nodes. </description> </method> <method name="remove_transition_by_index"> @@ -168,7 +169,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Deletes the given transition. + Deletes the given transition by index. </description> </method> <method name="rename_node"> diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 09cd369bc4..0198237bed 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeStateMachinePlayback" inherits="Resource" category="Core" version="3.2"> +<class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.0"> <brief_description> - Playback control for AnimationNodeStateMachine. + Playback control for [AnimationNodeStateMachine]. </brief_description> <description> Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. @@ -12,6 +12,7 @@ [/codeblock] </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="get_current_node" qualifiers="const"> @@ -25,6 +26,7 @@ <return type="PoolStringArray"> </return> <description> + Returns the current travel path as computed internally by the A* algorithm. </description> </method> <method name="is_playing" qualifiers="const"> diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 08ff9997cf..d40a6f1e46 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -1,18 +1,19 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeStateMachineTransition" inherits="Resource" category="Core" version="3.2"> +<class name="AnimationNodeStateMachineTransition" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> <members> <member name="advance_condition" type="String" setter="set_advance_condition" getter="get_advance_condition" default=""""> - Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to "idle": + Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: [codeblock] - $animation_tree["parameters/conditions/idle"] = is_on_floor and linear_velocity.x == 0 + $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0) [/codeblock] </member> <member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false"> @@ -34,6 +35,7 @@ <signals> <signal name="advance_condition_changed"> <description> + Emitted when [member advance_condition] is changed. </description> </signal> </signals> diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml index 9ce773c4e2..229f9bbba2 100644 --- a/doc/classes/AnimationNodeTimeScale.xml +++ b/doc/classes/AnimationNodeTimeScale.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeTimeScale" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml index d593f5489c..5a9cbe4861 100644 --- a/doc/classes/AnimationNodeTimeSeek.xml +++ b/doc/classes/AnimationNodeTimeSeek.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeTimeSeek" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index 82839b6bab..bf94fe0466 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeTransition" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="get_input_caption" qualifiers="const"> @@ -45,134 +46,6 @@ </method> </methods> <members> - <member name="input_0/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_0/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_1/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_1/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_10/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_10/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_11/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_11/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_12/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_12/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_13/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_13/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_14/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_14/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_15/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_15/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_16/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_16/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_17/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_17/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_18/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_18/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_19/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_19/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_2/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_2/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_20/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_20/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_21/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_21/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_22/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_22/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_23/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_23/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_24/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_24/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_25/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_25/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_26/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_26/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_27/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_27/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_28/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_28/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_29/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_29/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_3/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_3/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_30/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_30/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_31/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_31/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_4/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_4/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_5/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_5/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_6/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_6/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_7/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_7/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_8/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_8/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> - <member name="input_9/auto_advance" type="bool" setter="set_input_as_auto_advance" getter="is_input_set_as_auto_advance"> - </member> - <member name="input_9/name" type="String" setter="set_input_caption" getter="get_input_caption"> - </member> <member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0"> </member> <member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0"> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 60d04649a8..3e8315f686 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationPlayer" inherits="Node" category="Core" version="3.2"> +<class name="AnimationPlayer" inherits="Node" version="4.0"> <brief_description> Container and player of [Animation] resources. </brief_description> <description> An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. + [AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween] node, but it requires doing everything by code. Updating the target properties of animations occurs at process time. </description> <tutorials> @@ -106,7 +107,7 @@ <return type="float"> </return> <description> - Gets the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method. + Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method. </description> </method> <method name="get_queue"> @@ -144,9 +145,9 @@ <argument index="3" name="from_end" type="bool" default="false"> </argument> <description> - Plays the animation with key [code]name[/code]. Custom speed and blend times can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards. - If the animation has been paused by [method stop], it will be resumed. Calling [method play] without arguments will also resume the animation. - [b]Note:[/b] The animation will be updated the next time the AnimationPlayer is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code]. + Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]). + The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing. + [b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code]. </description> </method> <method name="play_backwards"> @@ -158,8 +159,7 @@ </argument> <description> Plays the animation with key [code]name[/code] in reverse. - If the animation has been paused by [code]stop(true)[/code], it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards. - [b]Note:[/b] This is the same as [code]play[/code] in regards to process/update behavior. + This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information. </description> </method> <method name="queue"> @@ -222,8 +222,8 @@ <argument index="0" name="reset" type="bool" default="true"> </argument> <description> - Stops the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. - If [code]reset[/code] is [code]false[/code], then calling [method play] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [method play_backwards]. + Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. + If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. </description> </method> </methods> diff --git a/doc/classes/AnimationRootNode.xml b/doc/classes/AnimationRootNode.xml index 735f3215e9..46759b7f4d 100644 --- a/doc/classes/AnimationRootNode.xml +++ b/doc/classes/AnimationRootNode.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationRootNode" inherits="AnimationNode" category="Core" version="3.2"> +<class name="AnimationRootNode" inherits="AnimationNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AnimationTrackEditPlugin.xml b/doc/classes/AnimationTrackEditPlugin.xml index 2dcabb051f..8490d48718 100644 --- a/doc/classes/AnimationTrackEditPlugin.xml +++ b/doc/classes/AnimationTrackEditPlugin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationTrackEditPlugin" inherits="Reference" category="Core" version="3.2"> +<class name="AnimationTrackEditPlugin" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index d1c24e466d..2a7db37eea 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationTree" inherits="Node" category="Core" version="3.2"> +<class name="AnimationTree" inherits="Node" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index 3b6003b478..e09e646960 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -1,13 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationTreePlayer" inherits="Node" category="Core" version="3.2"> +<class name="AnimationTreePlayer" inherits="Node" version="4.0"> <brief_description> - Animation Player that uses a node graph for blending Animations. + Animation player that uses a node graph for blending animations. </brief_description> <description> A node graph tool for blending multiple animations bound to an [AnimationPlayer]. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose. It takes [Animation]s from an [AnimationPlayer] node and mixes them depending on the graph. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> <method name="add_node"> @@ -27,7 +28,7 @@ <argument index="0" name="delta" type="float"> </argument> <description> - Shifts position in the animation timeline. Delta is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. + Shifts position in the animation timeline. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. </description> </method> <method name="animation_node_get_animation" qualifiers="const"> @@ -54,6 +55,7 @@ <argument index="0" name="id" type="String"> </argument> <description> + Returns the absolute playback timestamp of the animation node with name [code]id[/code]. </description> </method> <method name="animation_node_set_animation"> @@ -122,10 +124,8 @@ </argument> <description> Sets the blend amount of a Blend2 node given its name and value. - A Blend2 Node blends two animations with the amount between 0 and 1. - At 0, Output is input a. - Towards 1, the influence of a gets lessened, the influence of b gets raised. - At 1, Output is input b. + A Blend2 node blends two animations (A and B) with the amount between 0 and 1. + At 0, output is input A. Towards 1, the influence of A gets lessened, the influence of B gets raised. At 1, output is input B. </description> </method> <method name="blend2_node_set_filter_path"> @@ -138,7 +138,7 @@ <argument index="2" name="enable" type="bool"> </argument> <description> - If [code]enable[/code] is [code]true[/code], the blend2 node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate. + If [code]enable[/code] is [code]true[/code], the Blend2 node with name [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate. </description> </method> <method name="blend3_node_get_amount" qualifiers="const"> @@ -159,12 +159,8 @@ </argument> <description> Sets the blend amount of a Blend3 node given its name and value. - A Blend3 Node blends three animations with the amount between -1 and 1. - At -1, Output is input b-. - From -1 to 0, the influence of b- gets lessened, the influence of a gets raised and the influence of b+ is 0. - At 0, Output is input a. - From 0 to 1, the influence of a gets lessened, the influence of b+ gets raised and the influence of b+ is 0. - At 1, Output is input b+. + A Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1. + At -1, output is input B-. From -1 to 0, the influence of B- gets lessened, the influence of A gets raised and the influence of B+ is 0. At 0, output is input A. From 0 to 1, the influence of A gets lessened, the influence of B+ gets raised and the influence of B+ is 0. At 1, output is input B+. </description> </method> <method name="blend4_node_get_amount" qualifiers="const"> @@ -186,7 +182,7 @@ <description> Sets the blend amount of a Blend4 node given its name and value. A Blend4 Node blends two pairs of animations. - The two pairs are blended like blend2 and then added together. + The two pairs are blended like Blend2 and then added together. </description> </method> <method name="connect_nodes"> @@ -226,7 +222,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Returns mix amount of a Mix node given its name. + Returns the mix amount of a Mix node given its name. </description> </method> <method name="mix_node_set_amount"> @@ -237,7 +233,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> - Sets mix amount of a Mix node given its name and value. + Sets the mix amount of a Mix node given its name and value. A Mix node adds input b to input a by the amount given by ratio. </description> </method> @@ -285,7 +281,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Gets the node type, will return from [code]NODE_*[/code] enum. + Gets the node type, will return from [enum NodeType] enum. </description> </method> <method name="node_rename"> @@ -296,7 +292,7 @@ <argument index="1" name="new_name" type="String"> </argument> <description> - Rename a node in the graph. + Renames a node in the graph. </description> </method> <method name="node_set_position"> @@ -307,7 +303,7 @@ <argument index="1" name="screen_position" type="Vector2"> </argument> <description> - Sets position of a node in the graph given its name and position. + Sets the position of a node in the graph given its name and position. </description> </method> <method name="oneshot_node_get_autorestart_delay" qualifiers="const"> @@ -316,7 +312,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Returns autostart delay of a OneShot node given its name. + Returns the autostart delay of a OneShot node given its name. </description> </method> <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const"> @@ -325,7 +321,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Returns autostart random delay of a OneShot node given its name. + Returns the autostart random delay of a OneShot node given its name. </description> </method> <method name="oneshot_node_get_fadein_time" qualifiers="const"> @@ -334,7 +330,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Returns fade in time of a OneShot node given its name. + Returns the fade in time of a OneShot node given its name. </description> </method> <method name="oneshot_node_get_fadeout_time" qualifiers="const"> @@ -343,7 +339,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Returns fade out time of a OneShot node given its name. + Returns the fade out time of a OneShot node given its name. </description> </method> <method name="oneshot_node_has_autorestart" qualifiers="const"> @@ -372,7 +368,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Sets autorestart property of a OneShot node given its name and value. + Sets the autorestart property of a OneShot node given its name and value. </description> </method> <method name="oneshot_node_set_autorestart_delay"> @@ -383,7 +379,7 @@ <argument index="1" name="delay_sec" type="float"> </argument> <description> - Sets autorestart delay of a OneShot node given its name and value in seconds. + Sets the autorestart delay of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_autorestart_random_delay"> @@ -394,7 +390,7 @@ <argument index="1" name="rand_sec" type="float"> </argument> <description> - Sets autorestart random delay of a OneShot node given its name and value in seconds. + Sets the autorestart random delay of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_fadein_time"> @@ -405,7 +401,7 @@ <argument index="1" name="time_sec" type="float"> </argument> <description> - Sets fade in time of a OneShot node given its name and value in seconds. + Sets the fade in time of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_fadeout_time"> @@ -416,7 +412,7 @@ <argument index="1" name="time_sec" type="float"> </argument> <description> - Sets fade out time of a OneShot node given its name and value in seconds. + Sets the fade out time of a OneShot node given its name and value in seconds. </description> </method> <method name="oneshot_node_set_filter_path"> @@ -429,7 +425,7 @@ <argument index="2" name="enable" type="bool"> </argument> <description> - If [code]enable[/code] is [code]true[/code], the oneshot node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate. + If [code]enable[/code] is [code]true[/code], the OneShot node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate. </description> </method> <method name="oneshot_node_start"> @@ -479,7 +475,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Returns time scale value of the TimeScale node with name [code]id[/code]. + Returns the time scale value of the TimeScale node with name [code]id[/code]. </description> </method> <method name="timescale_node_set_scale"> @@ -491,7 +487,7 @@ </argument> <description> Sets the time scale of the TimeScale node with name [code]id[/code] to [code]scale[/code]. - The timescale node is used to speed [Animation]s up if the scale is above 1 or slow them down if it is below 1. + The TimeScale node is used to speed [Animation]s up if the scale is above 1 or slow them down if it is below 1. If applied after a blend or mix, affects all input animations to that blend or mix. </description> </method> @@ -533,7 +529,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Returns the number of inputs for the transition node with name [code]id[/code]. You can add inputs by rightclicking on the transition node. + Returns the number of inputs for the transition node with name [code]id[/code]. You can add inputs by right-clicking on the transition node. </description> </method> <method name="transition_node_get_xfade_time" qualifiers="const"> @@ -553,7 +549,7 @@ <argument index="1" name="input_idx" type="int"> </argument> <description> - Returns [code]true[/code] if the input at [code]input_idx[/code] on transition node with name [code]id[/code] is set to automatically advance to the next input upon completion. + Returns [code]true[/code] if the input at [code]input_idx[/code] on the transition node with name [code]id[/code] is set to automatically advance to the next input upon completion. </description> </method> <method name="transition_node_set_current"> @@ -609,11 +605,11 @@ </member> <member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path" default="NodePath("..")"> The node from which to relatively access other nodes. - It accesses the Bones, so it should point to the same Node the AnimationPlayer would point its Root Node at. + It accesses the bones, so it should point to the same node the [AnimationPlayer] would point its Root Node at. </member> <member name="master_player" type="NodePath" setter="set_master_player" getter="get_master_player" default="NodePath("")"> The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes. - Once set, Animation nodes can be added to the AnimationTreePlayer. + Once set, [Animation] nodes can be added to the [AnimationTreePlayer]. </member> <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode" default="1"> The thread in which to update animations. diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index 6bd1382488..f2f9284ae3 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Area" inherits="CollisionObject" category="Core" version="3.2"> +<class name="Area" inherits="CollisionObject" version="4.0"> <brief_description> General-purpose area node for detection and 3D physics influence. </brief_description> @@ -166,7 +166,7 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - Emitted when another area enters, reporting which areas overlapped. + Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. </description> </signal> <signal name="area_shape_exited"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 9a5870c73d..715e9b3286 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.2"> +<class name="Area2D" inherits="CollisionObject2D" version="4.0"> <brief_description> 2D area for detection and 2D physics influence. </brief_description> @@ -155,7 +155,7 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - Emitted when another area enters, reporting which shapes overlapped. + Emitted when another area enters, reporting which shapes overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. </description> </signal> <signal name="area_shape_exited"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index e09c1f4b08..08455bb7bc 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Array" category="Built-In Types" version="3.2"> +<class name="Array" version="4.0"> <brief_description> Generic array datatype. </brief_description> @@ -8,11 +8,11 @@ [b]Example:[/b] [codeblock] var array = ["One", 2, 3, "Four"] - print(array[0]) # One - print(array[2]) # 3 - print(array[-1]) # Four + print(array[0]) # One. + print(array[2]) # 3. + print(array[-1]) # Four. array[2] = "Three" - print(array[-2]) # Three + print(array[-2]) # Three. [/codeblock] Arrays are always passed by reference. </description> @@ -93,7 +93,7 @@ <return type="Variant"> </return> <description> - Returns the last element of the array if the array is not empty. + Returns the last element of the array, or [code]null[/code] if the array is empty. </description> </method> <method name="bsearch"> @@ -186,7 +186,7 @@ <return type="Variant"> </return> <description> - Returns the first element of the array if the array is not empty. + Returns the first element of the array, or [code]null[/code] if the array is empty. </description> </method> <method name="has"> @@ -243,14 +243,14 @@ <return type="Variant"> </return> <description> - Removes the last element of the array. + Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="pop_front"> <return type="Variant"> </return> <description> - Removes the first element of the array. + Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="push_back"> @@ -322,7 +322,12 @@ <method name="sort"> <description> Sorts the array. - [b]Note:[/b] strings are sorted in alphabetical, not natural order. + [b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example: + [codeblock] + var strings = ["string1", "string2", "string10", "string11"] + strings.sort() + print(strings) # Prints [string1, string10, string11, string2] + [/codeblock] </description> </method> <method name="sort_custom"> @@ -331,17 +336,18 @@ <argument index="1" name="func" type="String"> </argument> <description> - Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. + Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. [codeblock] class MyCustomSorter: - static func sort(a, b): + static func sort_ascending(a, b): if a[0] < b[0]: return true return false var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] - my_items.sort_custom(MyCustomSorter, "sort") + my_items.sort_custom(MyCustomSorter, "sort_ascending") + print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]]. [/codeblock] </description> </method> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 9f32691e57..821c6db717 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.2"> +<class name="ArrayMesh" inherits="Mesh" version="4.0"> <brief_description> [Mesh] type that provides utility for constructing a surface from arrays. </brief_description> <description> - The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle + The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. + The most basic example is the creation of a single triangle: [codeblock] var vertices = PoolVector3Array() vertices.push_back(Vector3(0, 1, 0)) @@ -20,9 +21,10 @@ var m = MeshInstance.new() m.mesh = arr_mesh [/codeblock] - The [code]MeshInstance[/code] is ready to be added to the SceneTree to be shown. + The [MeshInstance] is ready to be added to the [SceneTree] to be shown. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html</link> </tutorials> <methods> <method name="add_blend_shape"> @@ -47,7 +49,7 @@ </argument> <description> Creates a new surface. - Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See [Mesh] for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. + Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices. Godot uses clockwise winding order for front faces of triangle primitive modes. @@ -185,6 +187,7 @@ </methods> <members> <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1"> + Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. @@ -232,10 +235,10 @@ Array format will include vertices (mandatory). </constant> <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> - Array format will include normals + Array format will include normals. </constant> <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> - Array format will include tangents + Array format will include tangents. </constant> <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> Array format will include a color array. diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index db6ac1bc6d..7150490371 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AtlasTexture" inherits="Texture" category="Core" version="3.2"> +<class name="AtlasTexture" inherits="Texture" version="4.0"> <brief_description> Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls. </brief_description> diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml index fb36440a67..09746913bd 100644 --- a/doc/classes/AudioBusLayout.xml +++ b/doc/classes/AudioBusLayout.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioBusLayout" inherits="Resource" category="Core" version="3.2"> +<class name="AudioBusLayout" inherits="Resource" version="4.0"> <brief_description> Stores information about the audio buses. </brief_description> diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml index 3e7863a44c..60bf15ce57 100644 --- a/doc/classes/AudioEffect.xml +++ b/doc/classes/AudioEffect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffect" inherits="Resource" category="Core" version="3.2"> +<class name="AudioEffect" inherits="Resource" version="4.0"> <brief_description> Audio effect for audio. </brief_description> diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml index 3003238eb9..1334a81661 100644 --- a/doc/classes/AudioEffectAmplify.xml +++ b/doc/classes/AudioEffectAmplify.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectAmplify" inherits="AudioEffect" version="4.0"> <brief_description> Adds an amplifying audio effect to an audio bus. Increases or decreases the volume of the selected audio bus. diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml index f85c8cdd32..e8b398c8f4 100644 --- a/doc/classes/AudioEffectBandLimitFilter.xml +++ b/doc/classes/AudioEffectBandLimitFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> +<class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> Adds a band limit filter to the audio bus. </brief_description> diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml index 359eb9d669..ad3dbc5256 100644 --- a/doc/classes/AudioEffectBandPassFilter.xml +++ b/doc/classes/AudioEffectBandPassFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> +<class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> Adds a band pass filter to the audio bus. </brief_description> diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml index 4da125ba63..30913a1529 100644 --- a/doc/classes/AudioEffectChorus.xml +++ b/doc/classes/AudioEffectChorus.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectChorus" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectChorus" inherits="AudioEffect" version="4.0"> <brief_description> Adds a chorus audio effect. </brief_description> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index 6834804ea7..fe0d63777f 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectCompressor" inherits="AudioEffect" version="4.0"> <brief_description> Adds a compressor audio effect to an audio bus. Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index aea6ead983..e55e0cb2ad 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectDelay" inherits="AudioEffect" version="4.0"> <brief_description> Adds a delay audio effect to an audio bus. Plays input signal back after a period of time. Two tap delay and feedback options. diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml index 0ee7d73f88..3cfeaadb23 100644 --- a/doc/classes/AudioEffectDistortion.xml +++ b/doc/classes/AudioEffectDistortion.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectDistortion" inherits="AudioEffect" version="4.0"> <brief_description> Adds a distortion audio effect to an Audio bus. Modify the sound to make it dirty. diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml index d30b6fc71d..c27c2f221c 100644 --- a/doc/classes/AudioEffectEQ.xml +++ b/doc/classes/AudioEffectEQ.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectEQ" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectEQ" inherits="AudioEffect" version="4.0"> <brief_description> Base class for audio equalizers. Gives you control over frequencies. Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs. diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml index e94c4c71df..c9fb03e23c 100644 --- a/doc/classes/AudioEffectEQ10.xml +++ b/doc/classes/AudioEffectEQ10.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectEQ10" inherits="AudioEffectEQ" category="Core" version="3.2"> +<class name="AudioEffectEQ10" inherits="AudioEffectEQ" version="4.0"> <brief_description> Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz. Each frequency can be modulated between -60/+24 dB. diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml index dd26e06ee8..7ff8a1756e 100644 --- a/doc/classes/AudioEffectEQ21.xml +++ b/doc/classes/AudioEffectEQ21.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectEQ21" inherits="AudioEffectEQ" category="Core" version="3.2"> +<class name="AudioEffectEQ21" inherits="AudioEffectEQ" version="4.0"> <brief_description> Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz. Each frequency can be modulated between -60/+24 dB. diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml index eb3dc738ef..b47da5ed2a 100644 --- a/doc/classes/AudioEffectEQ6.xml +++ b/doc/classes/AudioEffectEQ6.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectEQ6" inherits="AudioEffectEQ" category="Core" version="3.2"> +<class name="AudioEffectEQ6" inherits="AudioEffectEQ" version="4.0"> <brief_description> Adds a 6-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. Each frequency can be modulated between -60/+24 dB. diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml index 5daad6748f..f548fb49cc 100644 --- a/doc/classes/AudioEffectFilter.xml +++ b/doc/classes/AudioEffectFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectFilter" inherits="AudioEffect" version="4.0"> <brief_description> Adds a filter to the audio bus. </brief_description> diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml index 589195da02..82a3c74941 100644 --- a/doc/classes/AudioEffectHighPassFilter.xml +++ b/doc/classes/AudioEffectHighPassFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> +<class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> Adds a high-pass filter to the Audio Bus. </brief_description> diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml index cccd18afcc..cf620e4417 100644 --- a/doc/classes/AudioEffectHighShelfFilter.xml +++ b/doc/classes/AudioEffectHighShelfFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> +<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioEffectInstance.xml b/doc/classes/AudioEffectInstance.xml index eb8bcfdf2a..dc76880a36 100644 --- a/doc/classes/AudioEffectInstance.xml +++ b/doc/classes/AudioEffectInstance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectInstance" inherits="Reference" category="Core" version="3.2"> +<class name="AudioEffectInstance" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml index ee6252809a..2fbea06aed 100644 --- a/doc/classes/AudioEffectLimiter.xml +++ b/doc/classes/AudioEffectLimiter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectLimiter" inherits="AudioEffect" version="4.0"> <brief_description> Adds a soft-clip limiter audio effect to an Audio bus. </brief_description> diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml index c0319a6713..e7a66d03bd 100644 --- a/doc/classes/AudioEffectLowPassFilter.xml +++ b/doc/classes/AudioEffectLowPassFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> +<class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> Adds a low-pass filter to the Audio bus. </brief_description> diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml index 1e60e637fc..7cf09b0f05 100644 --- a/doc/classes/AudioEffectLowShelfFilter.xml +++ b/doc/classes/AudioEffectLowShelfFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> +<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml index 4b5cfd7e51..2393674a2e 100644 --- a/doc/classes/AudioEffectNotchFilter.xml +++ b/doc/classes/AudioEffectNotchFilter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> +<class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" version="4.0"> <brief_description> Adds a notch filter to the Audio bus. </brief_description> diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml index e3a2dfcf21..19c4cd1457 100644 --- a/doc/classes/AudioEffectPanner.xml +++ b/doc/classes/AudioEffectPanner.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectPanner" inherits="AudioEffect" version="4.0"> <brief_description> Adds a panner audio effect to an Audio bus. Pans sound left or right. </brief_description> diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml index 445f78dd73..b1d229e150 100644 --- a/doc/classes/AudioEffectPhaser.xml +++ b/doc/classes/AudioEffectPhaser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectPhaser" inherits="AudioEffect" version="4.0"> <brief_description> Adds a phaser audio effect to an Audio bus. Combines the original signal with a copy that is slightly out of phase with the original. diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index 1f891dfb32..afe364de63 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectPitchShift" inherits="AudioEffect" version="4.0"> <brief_description> Adds a pitch-shifting audio effect to an Audio bus. Raises or lowers the pitch of original sound. diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index 4f97797b37..189e3c7059 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectRecord" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectRecord" inherits="AudioEffect" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index a0664e727f..26eb2be753 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectReverb" inherits="AudioEffect" version="4.0"> <brief_description> Adds a reverberation audio effect to an Audio bus. Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml index a56e4f2692..4c08b18f1d 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzer.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectSpectrumAnalyzer" inherits="AudioEffect" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml index ca068d572d..53428cdfb8 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectSpectrumAnalyzerInstance" inherits="AudioEffectInstance" category="Core" version="3.2"> +<class name="AudioEffectSpectrumAnalyzerInstance" inherits="AudioEffectInstance" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml index 6cb692b5d7..663e3e982c 100644 --- a/doc/classes/AudioEffectStereoEnhance.xml +++ b/doc/classes/AudioEffectStereoEnhance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioEffectStereoEnhance" inherits="AudioEffect" category="Core" version="3.2"> +<class name="AudioEffectStereoEnhance" inherits="AudioEffect" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 2d3ceebed5..72acf616a9 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioServer" inherits="Object" category="Core" version="3.2"> +<class name="AudioServer" inherits="Object" version="4.0"> <brief_description> Server interface for low-level audio access. </brief_description> <description> - AudioServer is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. + [AudioServer] is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> @@ -32,25 +32,27 @@ Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code]. </description> </method> - <method name="capture_get_device_list"> - <return type="Array"> + <method name="capture_get_device"> + <return type="String"> </return> <description> - Returns the names of all audio input devices detected on the system. + Name of the current device for audio input (see [method capture_get_device_list]). </description> </method> - <method name="capture_start"> - <return type="int" enum="Error"> + <method name="capture_get_device_list"> + <return type="Array"> </return> <description> - Attempts to start recording from the audio driver's capture device. On success, the return value is [constant OK]. + Returns the names of all audio input devices detected on the system. </description> </method> - <method name="capture_stop"> - <return type="int" enum="Error"> + <method name="capture_set_device"> + <return type="void"> </return> + <argument index="0" name="name" type="String"> + </argument> <description> - Attempts to stop recording from the audio driver's capture device. On success, the return value is [constant OK]. + Sets which audio input device is used for audio capture. </description> </method> <method name="generate_bus_layout" qualifiers="const"> @@ -99,6 +101,7 @@ <argument index="2" name="channel" type="int" default="0"> </argument> <description> + Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel). </description> </method> <method name="get_bus_index" qualifiers="const"> @@ -159,32 +162,11 @@ Returns the volume of the bus at index [code]bus_idx[/code] in dB. </description> </method> - <method name="get_capture_buffer"> - <return type="PoolIntArray"> - </return> - <description> - Returns an [PoolIntArray] containing audio frames from the capture device. - </description> - </method> - <method name="get_capture_position"> - <return type="int"> - </return> - <description> - Returns the write position of the capture device buffer. - </description> - </method> - <method name="get_capture_size"> - <return type="int"> - </return> - <description> - Returns the size of the capture device buffer. - </description> - </method> <method name="get_device_list"> <return type="Array"> </return> <description> - Returns the names of all audio output devices detected on the system. + Returns the names of all audio devices detected on the system. </description> </method> <method name="get_mix_rate" qualifiers="const"> @@ -212,12 +194,14 @@ <return type="float"> </return> <description> + Returns the relative time since the last mix occurred. </description> </method> <method name="get_time_to_next_mix" qualifiers="const"> <return type="float"> </return> <description> + Returns the relative time until the next mix occurs. </description> </method> <method name="is_bus_bypassing_effects" qualifiers="const"> @@ -262,7 +246,8 @@ <return type="void"> </return> <description> - Locks the audio driver's main loop. Remember to unlock it afterwards. + Locks the audio driver's main loop. + [b]Note:[/b] Remember to unlock it afterwards. </description> </method> <method name="move_bus"> @@ -409,9 +394,6 @@ <member name="bus_count" type="int" setter="set_bus_count" getter="get_bus_count" default="1"> Number of available audio buses. </member> - <member name="capture_device" type="String" setter="capture_set_device" getter="capture_get_device" default=""""> - Name of the current device for audio input (see [method capture_get_device_list]). - </member> <member name="device" type="String" setter="set_device" getter="get_device" default=""Default""> Name of the current device for audio output (see [method get_device_list]). </member> @@ -420,14 +402,6 @@ </member> </members> <signals> - <signal name="audio_mix_callback"> - <description> - </description> - </signal> - <signal name="audio_update_callback"> - <description> - </description> - </signal> <signal name="bus_layout_changed"> <description> Emitted when the [AudioBusLayout] changes. @@ -442,10 +416,10 @@ A 3.1 channel surround setup was detected. </constant> <constant name="SPEAKER_SURROUND_51" value="2" enum="SpeakerMode"> - A 5.1 channel surround setup was detected. + A 5.1 channel surround setup was detected. </constant> <constant name="SPEAKER_SURROUND_71" value="3" enum="SpeakerMode"> - A 7.1 channel surround setup was detected. + A 7.1 channel surround setup was detected. </constant> </constants> </class> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 15662b7eff..d5c8e42515 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStream" inherits="Resource" category="Core" version="3.2"> +<class name="AudioStream" inherits="Resource" version="4.0"> <brief_description> Base class for audio streams. </brief_description> diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml index 9a1e4432f1..e93da411cd 100644 --- a/doc/classes/AudioStreamGenerator.xml +++ b/doc/classes/AudioStreamGenerator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamGenerator" inherits="AudioStream" category="Core" version="3.2"> +<class name="AudioStreamGenerator" inherits="AudioStream" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index 448284e670..2552cd50a4 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" category="Core" version="3.2"> +<class name="AudioStreamGeneratorPlayback" inherits="AudioStreamPlaybackResampled" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioStreamMicrophone.xml b/doc/classes/AudioStreamMicrophone.xml index afa60655ea..e73e50e3a9 100644 --- a/doc/classes/AudioStreamMicrophone.xml +++ b/doc/classes/AudioStreamMicrophone.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamMicrophone" inherits="AudioStream" category="Core" version="3.2"> +<class name="AudioStreamMicrophone" inherits="AudioStream" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml index 92e654a50f..f928d54526 100644 --- a/doc/classes/AudioStreamPlayback.xml +++ b/doc/classes/AudioStreamPlayback.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamPlayback" inherits="Reference" category="Core" version="3.2"> +<class name="AudioStreamPlayback" inherits="Reference" version="4.0"> <brief_description> Meta class for playing back audio. </brief_description> diff --git a/doc/classes/AudioStreamPlaybackResampled.xml b/doc/classes/AudioStreamPlaybackResampled.xml index 07e7e70bf1..faa563fdd8 100644 --- a/doc/classes/AudioStreamPlaybackResampled.xml +++ b/doc/classes/AudioStreamPlaybackResampled.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" category="Core" version="3.2"> +<class name="AudioStreamPlaybackResampled" inherits="AudioStreamPlayback" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 4bc29335ff..2d65defad3 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.2"> +<class name="AudioStreamPlayer" inherits="Node" version="4.0"> <brief_description> Plays back audio non-positionally. </brief_description> @@ -21,6 +21,7 @@ <return type="AudioStreamPlayback"> </return> <description> + Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer]. </description> </method> <method name="play"> @@ -57,7 +58,7 @@ Bus on which this audio is playing. </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> - If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants. + If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants. </member> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> Changes the pitch and the tempo of the audio. @@ -69,6 +70,7 @@ The [AudioStream] object to be played. </member> <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> + If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code]. </member> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Volume of sound, in dB. diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 4734aff770..66254b504a 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamPlayer2D" inherits="Node2D" category="Core" version="3.2"> +<class name="AudioStreamPlayer2D" inherits="Node2D" version="4.0"> <brief_description> Plays audio in 2D. </brief_description> @@ -21,6 +21,7 @@ <return type="AudioStreamPlayback"> </return> <description> + Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D]. </description> </method> <method name="play"> @@ -75,6 +76,7 @@ The [AudioStream] object to be played. </member> <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> + If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code]. </member> <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Base volume without dampening. diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index a73f96d082..f476bec323 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamPlayer3D" inherits="Spatial" category="Core" version="3.2"> +<class name="AudioStreamPlayer3D" inherits="Spatial" version="4.0"> <brief_description> Plays 3D sound in 3D space. </brief_description> @@ -21,6 +21,7 @@ <return type="AudioStreamPlayback"> </return> <description> + Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D]. </description> </method> <method name="play"> @@ -99,6 +100,7 @@ The [AudioStream] object to be played. </member> <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> + If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code]. </member> <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0"> Base sound level unaffected by dampening, in dB. diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml index a2ee314d92..7e93b3267c 100644 --- a/doc/classes/AudioStreamRandomPitch.xml +++ b/doc/classes/AudioStreamRandomPitch.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.2"> +<class name="AudioStreamRandomPitch" inherits="AudioStream" version="4.0"> <brief_description> Plays audio with random pitch shifting. </brief_description> diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index a496902ded..898879ae27 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.2"> +<class name="AudioStreamSample" inherits="AudioStream" version="4.0"> <brief_description> Stores audio data loaded from WAV files. </brief_description> @@ -27,7 +27,7 @@ [b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. </member> <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0"> - Audio format. See [code]FORMAT_*[/code] constants for values. + Audio format. See [enum Format] constants for values. </member> <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0"> Loop start in bytes. @@ -36,7 +36,7 @@ Loop end in bytes. </member> <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0"> - Loop mode. See [code]LOOP_*[/code] constants for values. + Loop mode. See [enum LoopMode] constants for values. </member> <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100"> The sample rate for mixing this audio. diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml index 945af0c701..1f7554f978 100644 --- a/doc/classes/BackBufferCopy.xml +++ b/doc/classes/BackBufferCopy.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BackBufferCopy" inherits="Node2D" category="Core" version="3.2"> +<class name="BackBufferCopy" inherits="Node2D" version="4.0"> <brief_description> Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function. </brief_description> diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml index 4a1381295f..587ff7f304 100644 --- a/doc/classes/BakedLightmap.xml +++ b/doc/classes/BakedLightmap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.2"> +<class name="BakedLightmap" inherits="VisualInstance" version="4.0"> <brief_description> Prerendered indirect light map for a scene. </brief_description> @@ -18,7 +18,7 @@ <argument index="1" name="create_visual_debug" type="bool" default="false"> </argument> <description> - Bakes the lightmaps within the currently edited scene. + Bakes the lightmaps within the currently edited scene. Returns a [enum BakeError] to signify if the bake was successful, or if unsuccessful, how the bake failed. </description> </method> <method name="debug_bake"> @@ -81,14 +81,19 @@ More precise bake mode but can take considerably longer to bake. </constant> <constant name="BAKE_ERROR_OK" value="0" enum="BakeError"> + Baking was successful. </constant> <constant name="BAKE_ERROR_NO_SAVE_PATH" value="1" enum="BakeError"> + Returns if no viable save path is found. This can happen where an [member image_path] is not specified or when the save location is invalid. </constant> <constant name="BAKE_ERROR_NO_MESHES" value="2" enum="BakeError"> + Currently unused. </constant> <constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="3" enum="BakeError"> + Returns when the baker cannot save per-mesh textures to file. </constant> <constant name="BAKE_ERROR_USER_ABORTED" value="4" enum="BakeError"> + Returns if user cancels baking. </constant> </constants> </class> diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml index 68bbfb8f60..9193fb3b68 100644 --- a/doc/classes/BakedLightmapData.xml +++ b/doc/classes/BakedLightmapData.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.2"> +<class name="BakedLightmapData" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index b4f4b21afd..2147b2b4b0 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BaseButton" inherits="Control" category="Core" version="3.2"> +<class name="BaseButton" inherits="Control" version="4.0"> <brief_description> Base class for different kinds of buttons. </brief_description> @@ -22,14 +22,14 @@ <argument index="0" name="button_pressed" type="bool"> </argument> <description> - Called when the button is toggled (only if toggle_mode is active). + Called when the button is toggled (only if [member toggle_mode] is active). </description> </method> <method name="get_draw_mode" qualifiers="const"> <return type="int" enum="BaseButton.DrawMode"> </return> <description> - Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [code]DRAW_*[/code] enum. + Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum. </description> </method> <method name="is_hovered" qualifiers="const"> @@ -42,7 +42,7 @@ </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1"> - Determines when the button is considered clicked, one of the [code]ACTION_MODE_*[/code] constants. + Determines when the button is considered clicked, one of the [enum ActionMode] constants. </member> <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1"> Binary mask to choose which mouse buttons this button will respond to. @@ -62,7 +62,7 @@ If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> - If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). + If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). </member> <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut"> [ShortCut] associated to the button. @@ -112,6 +112,7 @@ The state of buttons are disabled. </constant> <constant name="DRAW_HOVER_PRESSED" value="4" enum="DrawMode"> + The state of buttons are both hovered and pressed. </constant> <constant name="ACTION_MODE_BUTTON_PRESS" value="0" enum="ActionMode"> Require just a press to consider the button clicked. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index df9438e695..e2b5c23c11 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Basis" category="Built-In Types" version="3.2"> +<class name="Basis" version="4.0"> <brief_description> 3×3 matrix datatype. </brief_description> @@ -64,20 +64,21 @@ <return type="Vector3"> </return> <description> - Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Returns the basis's rotation in the form of Euler angles (in the YXZ convention: first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). See [method get_rotation_quat] if you need a quaternion instead. </description> </method> <method name="get_orthogonal_index"> <return type="int"> </return> <description> - This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code. + This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to the Godot source code. </description> </method> <method name="get_rotation_quat"> <return type="Quat"> </return> <description> + Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles. </description> </method> <method name="get_scale"> @@ -102,6 +103,7 @@ <argument index="1" name="epsilon" type="float" default="0.00001"> </argument> <description> + Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="orthonormalized"> @@ -209,12 +211,16 @@ </members> <constants> <constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> + The identity basis. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer. </constant> <constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )"> + The basis that will flip something along the X axis when used in a transformation. </constant> <constant name="FLIP_Y" value="Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )"> + The basis that will flip something along the Y axis when used in a transformation. </constant> <constant name="FLIP_Z" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )"> + The basis that will flip something along the Z axis when used in a transformation. </constant> </constants> </class> diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index 7f03c22b70..f0ac7d1160 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BitMap" inherits="Resource" category="Core" version="3.2"> +<class name="BitMap" inherits="Resource" version="4.0"> <brief_description> Boolean matrix. </brief_description> diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml index 16a28978d5..87cccca310 100644 --- a/doc/classes/BitmapFont.xml +++ b/doc/classes/BitmapFont.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BitmapFont" inherits="Font" category="Core" version="3.2"> +<class name="BitmapFont" inherits="Font" version="4.0"> <brief_description> - Renders text using [code]*.fnt[/code] fonts. + Renders text using fonts under the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. + Handles files with the [code].fnt[/code] extension. </brief_description> <description> Renders text using [code]*.fnt[/code] fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see [DynamicFont]. diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml index 21e08f13f9..910d488dfd 100644 --- a/doc/classes/Bone2D.xml +++ b/doc/classes/Bone2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Bone2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Bone2D" inherits="Node2D" version="4.0"> <brief_description> Joint used with [Skeleton2D] to control and animate other nodes. </brief_description> diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml index a6145b6a78..d15322254b 100644 --- a/doc/classes/BoneAttachment.xml +++ b/doc/classes/BoneAttachment.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BoneAttachment" inherits="Spatial" category="Core" version="3.2"> +<class name="BoneAttachment" inherits="Spatial" version="4.0"> <brief_description> A node that will attach to a bone. </brief_description> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index ae0a20b8f6..4b5d4c853a 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BoxContainer" inherits="Container" category="Core" version="3.2"> +<class name="BoxContainer" inherits="Container" version="4.0"> <brief_description> Base class for box containers. </brief_description> @@ -23,7 +23,6 @@ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0"> The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]). </member> - <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" /> </members> <constants> <constant name="ALIGN_BEGIN" value="0" enum="AlignMode"> diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml index 9e3977b342..3a5f05ef79 100644 --- a/doc/classes/BoxShape.xml +++ b/doc/classes/BoxShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="BoxShape" inherits="Shape" category="Core" version="3.2"> +<class name="BoxShape" inherits="Shape" version="4.0"> <brief_description> Box shape resource. </brief_description> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 305be8b58d..23c357ac68 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Button" inherits="BaseButton" category="Core" version="3.2"> +<class name="Button" inherits="BaseButton" version="4.0"> <brief_description> Standard themed Button. </brief_description> @@ -12,7 +12,7 @@ </methods> <members> <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1"> - Text alignment policy for the button's text, use one of the [code]ALIGN_*[/code] constants. + Text alignment policy for the button's text, use one of the [enum TextAlign] constants. </member> <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false"> When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. @@ -43,26 +43,37 @@ </constants> <theme_items> <theme_item name="disabled" type="StyleBox"> + [StyleBox] used when the [Button] is disabled. </theme_item> <theme_item name="focus" type="StyleBox"> + [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> <theme_item name="font" type="Font"> + [Font] of the [Button]'s text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default text [Color] of the [Button]. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + Text [Color] used when the [Button] is disabled. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Text [Color] used when the [Button] is being hovered. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [Button] is being pressed. </theme_item> <theme_item name="hover" type="StyleBox"> + [StyleBox] used when the [Button] is being hovered. </theme_item> <theme_item name="hseparation" type="int" default="2"> + The horizontal space between [Button]'s icon and text. </theme_item> <theme_item name="normal" type="StyleBox"> + Default [StyleBox] for the [Button]. </theme_item> <theme_item name="pressed" type="StyleBox"> + [StyleBox] used when the [Button] is being pressed. </theme_item> </theme_items> </class> diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 2c1f3163e0..b7f3234b36 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ButtonGroup" inherits="Resource" category="Core" version="3.2"> +<class name="ButtonGroup" inherits="Resource" version="4.0"> <brief_description> Group of Buttons. </brief_description> diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index e68b0feb2d..b9cc655784 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CPUParticles" inherits="GeometryInstance" category="Core" version="3.2"> +<class name="CPUParticles" inherits="GeometryInstance" version="4.0"> <brief_description> CPU-based 3D particle emitter. </brief_description> @@ -25,6 +25,7 @@ <argument index="0" name="param" type="int" enum="CPUParticles.Parameter"> </argument> <description> + Returns the base value of the parameter specified by [enum Parameter]. </description> </method> <method name="get_param_curve" qualifiers="const"> @@ -33,6 +34,7 @@ <argument index="0" name="param" type="int" enum="CPUParticles.Parameter"> </argument> <description> + Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> <method name="get_param_randomness" qualifiers="const"> @@ -41,6 +43,7 @@ <argument index="0" name="param" type="int" enum="CPUParticles.Parameter"> </argument> <description> + Returns the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="get_particle_flag" qualifiers="const"> @@ -49,6 +52,7 @@ <argument index="0" name="flag" type="int" enum="CPUParticles.Flags"> </argument> <description> + Returns the enabled state of the given flag (see [enum Flags] for options). </description> </method> <method name="restart"> @@ -66,6 +70,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the base value of the parameter specified by [enum Parameter]. </description> </method> <method name="set_param_curve"> @@ -76,6 +81,7 @@ <argument index="1" name="curve" type="Curve"> </argument> <description> + Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> <method name="set_param_randomness"> @@ -86,6 +92,7 @@ <argument index="1" name="randomness" type="float"> </argument> <description> + Sets the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="set_particle_flag"> @@ -96,6 +103,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Enables or disables the given flag (see [enum Flags] for options). </description> </method> </methods> @@ -164,10 +172,13 @@ The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. </member> <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )"> + Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals"> + Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )"> + Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0"> Particles will be emitted inside this region. See [enum EmissionShape] for possible values. @@ -367,5 +378,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index c8dbffb4cb..e747feeae8 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CPUParticles2D" inherits="Node2D" category="Core" version="3.2"> +<class name="CPUParticles2D" inherits="Node2D" version="4.0"> <brief_description> CPU-based 2D particle emitter. </brief_description> @@ -26,6 +26,7 @@ <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> </argument> <description> + Returns the base value of the parameter specified by [enum Parameter]. </description> </method> <method name="get_param_curve" qualifiers="const"> @@ -34,6 +35,7 @@ <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> </argument> <description> + Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> <method name="get_param_randomness" qualifiers="const"> @@ -42,6 +44,7 @@ <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> </argument> <description> + Returns the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="get_particle_flag" qualifiers="const"> @@ -50,6 +53,7 @@ <argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags"> </argument> <description> + Returns the enabled state of the given flag (see [enum Flags] for options). </description> </method> <method name="restart"> @@ -67,6 +71,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the base value of the parameter specified by [enum Parameter]. </description> </method> <method name="set_param_curve"> @@ -77,6 +82,7 @@ <argument index="1" name="curve" type="Curve"> </argument> <description> + Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> <method name="set_param_randomness"> @@ -87,6 +93,7 @@ <argument index="1" name="randomness" type="float"> </argument> <description> + Sets the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="set_particle_flag"> @@ -97,6 +104,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Enables or disables the given flag (see [enum Flags] for options). </description> </method> </methods> @@ -162,10 +170,13 @@ Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> + Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_normals" type="PoolVector2Array" setter="set_emission_normals" getter="get_emission_normals"> + Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_points" type="PoolVector2Array" setter="set_emission_points" getter="get_emission_points"> + Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> <member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents"> The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]. @@ -188,8 +199,6 @@ <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> Align Y axis of particle with the direction of its velocity. </member> - <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> - </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> @@ -360,5 +369,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index 3b4313b204..84f6fa8b8e 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Camera" inherits="Spatial" category="Core" version="3.2"> +<class name="Camera" inherits="Spatial" version="4.0"> <brief_description> Camera node, displays from a point of view. </brief_description> @@ -38,12 +38,14 @@ <argument index="0" name="layer" type="int"> </argument> <description> + Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise. </description> </method> <method name="get_frustum" qualifiers="const"> <return type="Array"> </return> <description> + Returns the camera's frustum planes in world-space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset]. </description> </method> <method name="is_position_behind" qualifiers="const"> @@ -109,6 +111,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Enables or disables the given [code]layer[/code] in the [member cull_mask]. </description> </method> <method name="set_frustum"> @@ -123,6 +126,7 @@ <argument index="3" name="z_far" type="float"> </argument> <description> + Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. </description> </method> <method name="set_orthogonal"> @@ -135,7 +139,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Sets the camera projection to orthogonal mode, by specifying a width and the [code]near[/code] and [code]far[/code] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) + Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. (As a hint, 2D games often use this projection, with values specified in pixels.) </description> </method> <method name="set_perspective"> @@ -148,7 +152,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Sets the camera projection to perspective mode, by specifying a [code]fov[/code] angle in degrees (FOV means Field of View), and the [code]near[/code] and [code]far[/code] clip planes in world-space units. + Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. </description> </method> <method name="unproject_position" qualifiers="const"> @@ -169,7 +173,7 @@ If [code]true[/code], the ancestor [Viewport] is currently using this camera. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0"> - If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. + If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> The [Environment] to use for this camera. @@ -181,6 +185,7 @@ The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle. </member> <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )"> + The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]. </member> <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0"> The horizontal (X) offset of the camera viewport. @@ -218,13 +223,13 @@ Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. </constant> <constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking"> - Disables Doppler effect simulation (default). + Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default). </constant> <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking"> - Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> <constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking"> - Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> </constants> </class> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 6f1627e296..73892481e6 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Camera2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Camera2D" inherits="Node2D" version="4.0"> <brief_description> Camera node for 2D scenes. </brief_description> @@ -103,7 +103,7 @@ </methods> <members> <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1"> - The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants. + The Camera2D's anchor point. See [enum AnchorMode] constants. </member> <member name="current" type="bool" setter="_set_current" getter="is_current" default="false"> If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml index f490faf369..14d0559c85 100644 --- a/doc/classes/CameraFeed.xml +++ b/doc/classes/CameraFeed.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CameraFeed" inherits="Reference" category="Core" version="3.2"> +<class name="CameraFeed" inherits="Reference" version="4.0"> <brief_description> A camera feed gives you access to a single physical camera attached to your device. </brief_description> diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml index 850794c1da..82d1faf716 100644 --- a/doc/classes/CameraServer.xml +++ b/doc/classes/CameraServer.xml @@ -1,9 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CameraServer" inherits="Object" category="Core" version="3.2"> +<class name="CameraServer" inherits="Object" version="4.0"> <brief_description> - The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. + Server keeping track of different cameras accessible in Godot. </brief_description> <description> + The [CameraServer] keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. + It is notably used to provide AR modules with a video feed from the camera. </description> <tutorials> </tutorials> @@ -55,14 +57,14 @@ <argument index="0" name="id" type="int"> </argument> <description> - Emitted when a [CameraFeed] is added (webcam is plugged in). + Emitted when a [CameraFeed] is added (e.g. webcam is plugged in). </description> </signal> <signal name="camera_feed_removed"> <argument index="0" name="id" type="int"> </argument> <description> - Emitted when a [CameraFeed] is removed (webcam is removed). + Emitted when a [CameraFeed] is removed (e.g. webcam is unplugged). </description> </signal> </signals> diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml index e2bff76998..d4b7310819 100644 --- a/doc/classes/CameraTexture.xml +++ b/doc/classes/CameraTexture.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CameraTexture" inherits="Texture" category="Core" version="3.2"> +<class name="CameraTexture" inherits="Texture" version="4.0"> <brief_description> - This texture gives access to the camera texture provided by a [CameraFeed]. - [b]Note:[/b] Many cameras supply YCbCr images which need to be converted in a shader. + Texture provided by a [CameraFeed]. </brief_description> <description> + This texture gives access to the camera texture provided by a [CameraFeed]. + [b]Note:[/b] Many cameras supply YCbCr images which need to be converted in a shader. </description> <tutorials> </tutorials> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 8372d15324..b8e09708e3 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CanvasItem" inherits="Node" category="Core" version="3.2"> +<class name="CanvasItem" inherits="Node" version="4.0"> <brief_description> Base class of anything 2D. </brief_description> <description> - Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. CanvasItem is extended by [Control] for anything GUI-related, and by [Node2D] for anything related to the 2D engine. - Any CanvasItem can draw. For this, [method update] must be called, then [constant NOTIFICATION_DRAW] will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the CanvasItem are provided (see [code]draw_*[/code] functions). However, they can only be used inside the [method Object._notification], signal or [method _draw] virtual functions. - Canvas items are drawn in tree order. By default, children are on top of their parents so a root CanvasItem will be drawn behind everything. This behavior can be changed on a per-item basis. - A CanvasItem can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. + Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. [CanvasItem] is extended by [Control] for anything GUI-related, and by [Node2D] for anything related to the 2D engine. + Any [CanvasItem] can draw. For this, [method update] must be called, then [constant NOTIFICATION_DRAW] will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside the [method Object._notification], signal or [method _draw] virtual functions. + Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis. + A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. </description> <tutorials> @@ -19,7 +19,7 @@ <return type="void"> </return> <description> - Called (if exists) to draw the canvas item. + Overridable function called by the engine (if defined) to draw the canvas item. </description> </method> <method name="draw_arc"> @@ -42,6 +42,7 @@ <argument index="7" name="antialiased" type="bool" default="false"> </argument> <description> + Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. </description> </method> <method name="draw_char"> @@ -124,6 +125,7 @@ <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <description> + Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation. </description> </method> <method name="draw_multiline"> @@ -166,6 +168,7 @@ <argument index="2" name="normal_map" type="Texture" default="null"> </argument> <description> + Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation. </description> </method> <method name="draw_polygon"> @@ -384,70 +387,70 @@ <return type="Transform2D"> </return> <description> - Gets the transform matrix of this item's canvas. + Returns the transform matrix of this item's canvas. </description> </method> <method name="get_global_mouse_position" qualifiers="const"> <return type="Vector2"> </return> <description> - Gets the global position of the mouse. + Returns the global position of the mouse. </description> </method> <method name="get_global_transform" qualifiers="const"> <return type="Transform2D"> </return> <description> - Gets the global transform matrix of this item. + Returns the global transform matrix of this item. </description> </method> <method name="get_global_transform_with_canvas" qualifiers="const"> <return type="Transform2D"> </return> <description> - Gets the global transform matrix of this item in relation to the canvas. + Returns the global transform matrix of this item in relation to the canvas. </description> </method> <method name="get_local_mouse_position" qualifiers="const"> <return type="Vector2"> </return> <description> - Gets the mouse position relative to this item's position. + Returns the mouse position relative to this item's position. </description> </method> <method name="get_transform" qualifiers="const"> <return type="Transform2D"> </return> <description> - Gets the transform matrix of this item. + Returns the transform matrix of this item. </description> </method> <method name="get_viewport_rect" qualifiers="const"> <return type="Rect2"> </return> <description> - Gets the viewport's boundaries as a [Rect2]. + Returns the viewport's boundaries as a [Rect2]. </description> </method> <method name="get_viewport_transform" qualifiers="const"> <return type="Transform2D"> </return> <description> - Gets this item's transform in relation to the viewport. + Returns this item's transform in relation to the viewport. </description> </method> <method name="get_world_2d" qualifiers="const"> <return type="World2D"> </return> <description> - Gets the [World2D] where this item is in. + Returns the [World2D] where this item is in. </description> </method> <method name="hide"> <return type="void"> </return> <description> - Hide the CanvasItem if it's currently visible. + Hide the [CanvasItem] if it's currently visible. </description> </method> <method name="is_local_transform_notification_enabled" qualifiers="const"> @@ -527,14 +530,14 @@ <return type="void"> </return> <description> - Show the CanvasItem if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. + Show the [CanvasItem] if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. </description> </method> <method name="update"> <return type="void"> </return> <description> - Queue the CanvasItem for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw. + Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw. </description> </method> </methods> @@ -567,7 +570,7 @@ <signals> <signal name="draw"> <description> - Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing. + Emitted when the [CanvasItem] must redraw. This can only be connected realtime, as deferred will not allow drawing. </description> </signal> <signal name="hide"> @@ -606,19 +609,19 @@ Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied. </constant> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000"> - The CanvasItem's transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform]. + The [CanvasItem]'s transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform]. </constant> <constant name="NOTIFICATION_DRAW" value="30"> - The CanvasItem is requested to draw. + The [CanvasItem] is requested to draw. </constant> <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31"> - The CanvasItem's visibility has changed. + The [CanvasItem]'s visibility has changed. </constant> <constant name="NOTIFICATION_ENTER_CANVAS" value="32"> - The CanvasItem has entered the canvas. + The [CanvasItem] has entered the canvas. </constant> <constant name="NOTIFICATION_EXIT_CANVAS" value="33"> - The CanvasItem has exited the canvas. + The [CanvasItem] has exited the canvas. </constant> </constants> </class> diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index 5963e00d9e..1265d2f268 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CanvasItemMaterial" inherits="Material" category="Core" version="3.2"> +<class name="CanvasItemMaterial" inherits="Material" version="4.0"> <brief_description> A material for [CanvasItem]s. </brief_description> @@ -18,12 +18,20 @@ The manner in which material reacts to lighting. </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> + The number of columns in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D]. + [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> + If [code]true[/code], the particles animation will loop. + [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> + The number of rows in the spritesheet assigned as [Texture] for a [Particles2D] or [CPUParticles2D]. + [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false"> + If [code]true[/code], enable spritesheet-based animation features when assigned to [Particles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play. + This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes. </member> </members> <constants> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 2e56009f50..8202a29d44 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CanvasLayer" inherits="Node" category="Core" version="3.2"> +<class name="CanvasLayer" inherits="Node" version="4.0"> <brief_description> Canvas drawing layer. </brief_description> @@ -24,8 +24,10 @@ The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead. </member> <member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false"> + Sets the layer to follow the viewport in order to simulate a pseudo 3D effect. </member> <member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale" default="1.0"> + Scales the layer when using [member follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. </member> <member name="layer" type="int" setter="set_layer" getter="get_layer" default="1"> Layer index for draw order. Lower values are drawn first. diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml index 95214b8c6a..19f8912cd8 100644 --- a/doc/classes/CanvasModulate.xml +++ b/doc/classes/CanvasModulate.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CanvasModulate" inherits="Node2D" category="Core" version="3.2"> +<class name="CanvasModulate" inherits="Node2D" version="4.0"> <brief_description> Tint the entire canvas. </brief_description> diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml index 3cdb9b3e22..fab11d44cc 100644 --- a/doc/classes/CapsuleMesh.xml +++ b/doc/classes/CapsuleMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CapsuleMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="CapsuleMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Class representing a capsule-shaped [PrimitiveMesh]. </brief_description> diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml index 0b55ca3472..c83e832281 100644 --- a/doc/classes/CapsuleShape.xml +++ b/doc/classes/CapsuleShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CapsuleShape" inherits="Shape" category="Core" version="3.2"> +<class name="CapsuleShape" inherits="Shape" version="4.0"> <brief_description> Capsule shape for collisions. </brief_description> diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml index a13abadf36..290d260f0f 100644 --- a/doc/classes/CapsuleShape2D.xml +++ b/doc/classes/CapsuleShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CapsuleShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="CapsuleShape2D" inherits="Shape2D" version="4.0"> <brief_description> Capsule shape for 2D collisions. </brief_description> diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml index d792b1b180..435f4eb06b 100644 --- a/doc/classes/CenterContainer.xml +++ b/doc/classes/CenterContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CenterContainer" inherits="Container" category="Core" version="3.2"> +<class name="CenterContainer" inherits="Container" version="4.0"> <brief_description> Keeps children controls centered. </brief_description> diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index e03229abe1..c16e448498 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -1,39 +1,51 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CharFXTransform" inherits="Reference" category="Core" version="3.2"> +<class name="CharFXTransform" inherits="Reference" version="4.0"> <brief_description> + Controls how an individual character will be displayed in a [RichTextEffect]. </brief_description> <description> + By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect]. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> - <method name="get_value_or"> - <return type="Variant"> - </return> - <argument index="0" name="key" type="String"> - </argument> - <argument index="1" name="default_value" type="Variant"> - </argument> - <description> - </description> - </method> </methods> <members> <member name="absolute_index" type="int" setter="set_absolute_index" getter="get_absolute_index" default="0"> + The index of the current character (starting from 0). Setting this property won't affect drawing. </member> <member name="character" type="int" setter="set_character" getter="get_character" default="0"> + The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks: + [codeblock] + # `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`. + # See the RichTextEffect documentation for details. + char_fx.character = ord("*") + [/codeblock] </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + The color the character will be drawn with. </member> <member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0"> + The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS]. + [b]Note:[/b] Time still passes while the [RichTextLabel] is hidden. </member> <member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}"> + Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form [code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string. + For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]: + [codeblock] + {"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)} + [/codeblock] </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + The position offset the character will be drawn with (in pixels). </member> <member name="relative_index" type="int" setter="set_relative_index" getter="get_relative_index" default="0"> + The index of the current character (starting from 0). Setting this property won't affect drawing. </member> <member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true"> + If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead. </member> </members> <constants> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 97ef4dbe95..ffcc22703f 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CheckBox" inherits="Button" category="Core" version="3.2"> +<class name="CheckBox" inherits="Button" version="4.0"> <brief_description> - Binary choice user interface widget. + Binary choice user interface widget. See also [CheckButton]. </brief_description> <description> - A checkbox allows the user to make a binary choice (choosing only one of two possible options). + A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different apperance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed. </description> <tutorials> </tutorials> @@ -18,41 +18,58 @@ </constants> <theme_items> <theme_item name="check_vadjust" type="int" default="0"> - The vertical offset used when rendering the check icons. + The vertical offset used when rendering the check icons (in pixels). </theme_item> <theme_item name="checked" type="Texture"> + The check icon to display when the [CheckBox] is checked. </theme_item> <theme_item name="disabled" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckBox] is disabled. </theme_item> <theme_item name="focus" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckBox] is focused. </theme_item> <theme_item name="font" type="Font"> + The [Font] to use for the [CheckBox] text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + The [CheckBox] text's font color. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + The [CheckBox] text's font color when it's disabled. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + The [CheckBox] text's font color when it's hovered. </theme_item> <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + The [CheckBox] text's font color when it's hovered and pressed. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + The [CheckBox] text's font color when it's pressed. </theme_item> <theme_item name="hover" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckBox] is hovered. </theme_item> <theme_item name="hover_pressed" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed. </theme_item> <theme_item name="hseparation" type="int" default="4"> + The separation between the check icon and the text (in pixels). </theme_item> <theme_item name="normal" type="StyleBox"> + The [StyleBox] to display as a background. </theme_item> <theme_item name="pressed" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckBox] is pressed. </theme_item> <theme_item name="radio_checked" type="Texture"> + If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked. </theme_item> <theme_item name="radio_unchecked" type="Texture"> + If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked. </theme_item> <theme_item name="unchecked" type="Texture"> + The check icon to display when the [CheckBox] is unchecked. </theme_item> </theme_items> </class> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 5b867b6a3a..6c024a3753 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CheckButton" inherits="Button" category="Core" version="3.2"> +<class name="CheckButton" inherits="Button" version="4.0"> <brief_description> - Checkable button. + Checkable button. See also [CheckBox]. </brief_description> <description> - CheckButton is a toggle button displayed as a check field. + CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different apperance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button. </description> <tutorials> </tutorials> @@ -18,41 +18,58 @@ </constants> <theme_items> <theme_item name="check_vadjust" type="int" default="0"> - The vertical offset used when rendering the icons. + The vertical offset used when rendering the toggle icons (in pixels). </theme_item> <theme_item name="disabled" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckButton] is disabled. </theme_item> <theme_item name="focus" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckButton] is focused. </theme_item> <theme_item name="font" type="Font"> + The [Font] to use for the [CheckButton] text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + The [CheckButton] text's font color. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + The [CheckButton] text's font color when it's disabled. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + The [CheckButton] text's font color when it's hovered. </theme_item> <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + The [CheckButton] text's font color when it's hovered and pressed. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + The [CheckButton] text's font color when it's pressed. </theme_item> <theme_item name="hover" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckButton] is hovered. </theme_item> <theme_item name="hover_pressed" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed. </theme_item> <theme_item name="hseparation" type="int" default="4"> + The separation between the toggle icon and the text (in pixels). </theme_item> <theme_item name="normal" type="StyleBox"> + The [StyleBox] to display as a background. </theme_item> <theme_item name="off" type="Texture"> + The icon to display when the [CheckButton] is unchecked. </theme_item> <theme_item name="off_disabled" type="Texture"> + The icon to display when the [CheckButton] is unchecked and disabled. </theme_item> <theme_item name="on" type="Texture"> + The icon to display when the [CheckButton] is checked. </theme_item> <theme_item name="on_disabled" type="Texture"> + The icon to display when the [CheckButton] is checked and disabled. </theme_item> <theme_item name="pressed" type="StyleBox"> + The [StyleBox] to display as a background when the [CheckButton] is pressed. </theme_item> </theme_items> </class> diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml index 4cff7b5cd4..db889b0f1b 100644 --- a/doc/classes/CircleShape2D.xml +++ b/doc/classes/CircleShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CircleShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="CircleShape2D" inherits="Shape2D" version="4.0"> <brief_description> Circular shape for 2D collisions. </brief_description> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index fd08643dd5..4d7ccb65e8 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ClassDB" inherits="Object" category="Core" version="3.2"> +<class name="ClassDB" inherits="Object" version="4.0"> <brief_description> Class information repository. </brief_description> diff --git a/doc/classes/ClippedCamera.xml b/doc/classes/ClippedCamera.xml index 9eda79bbae..4cdc098c2f 100644 --- a/doc/classes/ClippedCamera.xml +++ b/doc/classes/ClippedCamera.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ClippedCamera" inherits="Camera" category="Core" version="3.2"> +<class name="ClippedCamera" inherits="Camera" version="4.0"> <brief_description> A [Camera] that includes collision. </brief_description> diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml index c30aeafcf3..34758d71b2 100644 --- a/doc/classes/CollisionObject.xml +++ b/doc/classes/CollisionObject.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CollisionObject" inherits="Spatial" category="Core" version="3.2"> +<class name="CollisionObject" inherits="Spatial" version="4.0"> <brief_description> Base node for collision objects. </brief_description> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index b9ec9480cf..e8f7a59e4c 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.2"> +<class name="CollisionObject2D" inherits="Node2D" version="4.0"> <brief_description> Base node for 2D collision objects. </brief_description> @@ -44,6 +44,7 @@ <argument index="0" name="owner_id" type="int"> </argument> <description> + Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code]. </description> </method> <method name="get_shape_owners"> @@ -199,6 +200,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> + Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code] to [code]margin[/code] pixels. </description> </method> <method name="shape_owner_set_transform"> diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml index 994f589190..ac519d3817 100644 --- a/doc/classes/CollisionPolygon.xml +++ b/doc/classes/CollisionPolygon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CollisionPolygon" inherits="Spatial" category="Core" version="3.2"> +<class name="CollisionPolygon" inherits="Spatial" version="4.0"> <brief_description> Editor-only class for defining a collision polygon in 3D space. </brief_description> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index fe46d45f71..c4fd417918 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.2"> +<class name="CollisionPolygon2D" inherits="Node2D" version="4.0"> <brief_description> Defines a 2D collision polygon. </brief_description> <description> - Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygon can be drawn in the editor or specified by a list of vertices. + Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices. </description> <tutorials> </tutorials> @@ -12,18 +12,18 @@ </methods> <members> <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0"> - Collision build mode. Use one of the [code]BUILD_*[/code] constants. + Collision build mode. Use one of the [enum BuildMode] constants. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collisions will be detected. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> - If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. + If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> - The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference. + The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference. </member> </members> <constants> diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml index c34c0be839..7787bf957d 100644 --- a/doc/classes/CollisionShape.xml +++ b/doc/classes/CollisionShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CollisionShape" inherits="Spatial" category="Core" version="3.2"> +<class name="CollisionShape" inherits="Spatial" version="4.0"> <brief_description> Node that represents collision shape data in 3D space. </brief_description> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 5fd8826a98..4903f0d3a5 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CollisionShape2D" inherits="Node2D" category="Core" version="3.2"> +<class name="CollisionShape2D" inherits="Node2D" version="4.0"> <brief_description> Node that represents collision shape data in 2D space. </brief_description> @@ -19,6 +19,7 @@ Sets whether this collision shape should only detect collision on one side (top or bottom). </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> + The margin used for one-way collision (in pixels). </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> The actual shape owned by this collision shape. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index deba30712e..0d3f51309b 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Color" category="Built-In Types" version="3.2"> +<class name="Color" version="4.0"> <brief_description> Color in RGBA format with some support for ARGB format. </brief_description> <description> A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values greater than 1. - You can also create a color from standardized color names by using [method @GDScript.ColorN]. + You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. </description> <tutorials> </tutorials> @@ -18,11 +18,11 @@ <description> Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN]. [codeblock] - # Each of the following creates the same color RGBA(178, 217, 10, 255) - var c1 = Color("#ffb2d90a") # ARGB format with "#" - var c2 = Color("ffb2d90a") # ARGB format - var c3 = Color("#b2d90a") # RGB format with "#" - var c4 = Color("b2d90a") # RGB format + # Each of the following creates the same color RGBA(178, 217, 10, 255). + var c1 = Color("#ffb2d90a") # ARGB format with "#". + var c2 = Color("ffb2d90a") # ARGB format. + var c3 = Color("#b2d90a") # RGB format with "#". + var c4 = Color("b2d90a") # RGB format. [/codeblock] </description> </method> @@ -157,6 +157,7 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="lightened"> @@ -307,296 +308,442 @@ </members> <constants> <constant name="gray" value="Color( 0.75, 0.75, 0.75, 1 )"> + Gray color. </constant> <constant name="aliceblue" value="Color( 0.94, 0.97, 1, 1 )"> + Alice blue color. </constant> <constant name="antiquewhite" value="Color( 0.98, 0.92, 0.84, 1 )"> + Antique white color. </constant> <constant name="aqua" value="Color( 0, 1, 1, 1 )"> + Aqua color. </constant> <constant name="aquamarine" value="Color( 0.5, 1, 0.83, 1 )"> + Aquamarine color. </constant> <constant name="azure" value="Color( 0.94, 1, 1, 1 )"> + Azure color. </constant> <constant name="beige" value="Color( 0.96, 0.96, 0.86, 1 )"> + Beige color. </constant> <constant name="bisque" value="Color( 1, 0.89, 0.77, 1 )"> + Bisque color. </constant> <constant name="black" value="Color( 0, 0, 0, 1 )"> + Black color. </constant> <constant name="blanchedalmond" value="Color( 1, 0.92, 0.8, 1 )"> + Blanche almond color. </constant> <constant name="blue" value="Color( 0, 0, 1, 1 )"> + Blue color. </constant> <constant name="blueviolet" value="Color( 0.54, 0.17, 0.89, 1 )"> + Blue violet color. </constant> <constant name="brown" value="Color( 0.65, 0.16, 0.16, 1 )"> + Brown color. </constant> <constant name="burlywood" value="Color( 0.87, 0.72, 0.53, 1 )"> + Burly wood color. </constant> <constant name="cadetblue" value="Color( 0.37, 0.62, 0.63, 1 )"> + Cadet blue color. </constant> <constant name="chartreuse" value="Color( 0.5, 1, 0, 1 )"> + Chartreuse color. </constant> <constant name="chocolate" value="Color( 0.82, 0.41, 0.12, 1 )"> + Chocolate color. </constant> <constant name="coral" value="Color( 1, 0.5, 0.31, 1 )"> + Coral color. </constant> <constant name="cornflower" value="Color( 0.39, 0.58, 0.93, 1 )"> + Cornflower color. </constant> <constant name="cornsilk" value="Color( 1, 0.97, 0.86, 1 )"> + Corn silk color. </constant> <constant name="crimson" value="Color( 0.86, 0.08, 0.24, 1 )"> + Crimson color. </constant> <constant name="cyan" value="Color( 0, 1, 1, 1 )"> + Cyan color. </constant> <constant name="darkblue" value="Color( 0, 0, 0.55, 1 )"> + Dark blue color. </constant> <constant name="darkcyan" value="Color( 0, 0.55, 0.55, 1 )"> + Dark cyan color. </constant> <constant name="darkgoldenrod" value="Color( 0.72, 0.53, 0.04, 1 )"> + Dark goldenrod color. </constant> <constant name="darkgray" value="Color( 0.66, 0.66, 0.66, 1 )"> + Dark gray color. </constant> <constant name="darkgreen" value="Color( 0, 0.39, 0, 1 )"> + Dark green color. </constant> <constant name="darkkhaki" value="Color( 0.74, 0.72, 0.42, 1 )"> + Dark khaki color. </constant> <constant name="darkmagenta" value="Color( 0.55, 0, 0.55, 1 )"> + Dark magenta color. </constant> <constant name="darkolivegreen" value="Color( 0.33, 0.42, 0.18, 1 )"> + Dark olive green color. </constant> <constant name="darkorange" value="Color( 1, 0.55, 0, 1 )"> + Dark orange color. </constant> <constant name="darkorchid" value="Color( 0.6, 0.2, 0.8, 1 )"> + Dark orchid color. </constant> <constant name="darkred" value="Color( 0.55, 0, 0, 1 )"> + Dark red color. </constant> <constant name="darksalmon" value="Color( 0.91, 0.59, 0.48, 1 )"> + Dark salmon color. </constant> <constant name="darkseagreen" value="Color( 0.56, 0.74, 0.56, 1 )"> + Dark sea green color. </constant> <constant name="darkslateblue" value="Color( 0.28, 0.24, 0.55, 1 )"> + Dark slate blue color. </constant> <constant name="darkslategray" value="Color( 0.18, 0.31, 0.31, 1 )"> + Dark slate gray color. </constant> <constant name="darkturquoise" value="Color( 0, 0.81, 0.82, 1 )"> + Dark turquoise color. </constant> <constant name="darkviolet" value="Color( 0.58, 0, 0.83, 1 )"> + Dark violet color. </constant> <constant name="deeppink" value="Color( 1, 0.08, 0.58, 1 )"> + Deep pink color. </constant> <constant name="deepskyblue" value="Color( 0, 0.75, 1, 1 )"> + Deep sky blue color. </constant> <constant name="dimgray" value="Color( 0.41, 0.41, 0.41, 1 )"> + Dim gray color. </constant> <constant name="dodgerblue" value="Color( 0.12, 0.56, 1, 1 )"> + Dodger blue color. </constant> <constant name="firebrick" value="Color( 0.7, 0.13, 0.13, 1 )"> + Firebrick color. </constant> <constant name="floralwhite" value="Color( 1, 0.98, 0.94, 1 )"> + Floral white color. </constant> <constant name="forestgreen" value="Color( 0.13, 0.55, 0.13, 1 )"> + Forest green color. </constant> <constant name="fuchsia" value="Color( 1, 0, 1, 1 )"> + Fuchsia color. </constant> <constant name="gainsboro" value="Color( 0.86, 0.86, 0.86, 1 )"> + Gainsboro color. </constant> <constant name="ghostwhite" value="Color( 0.97, 0.97, 1, 1 )"> + Ghost white color. </constant> <constant name="gold" value="Color( 1, 0.84, 0, 1 )"> + Gold color. </constant> <constant name="goldenrod" value="Color( 0.85, 0.65, 0.13, 1 )"> + Goldenrod color. </constant> <constant name="green" value="Color( 0, 1, 0, 1 )"> + Green color. </constant> <constant name="greenyellow" value="Color( 0.68, 1, 0.18, 1 )"> + Green yellow color. </constant> <constant name="honeydew" value="Color( 0.94, 1, 0.94, 1 )"> + Honeydew color. </constant> <constant name="hotpink" value="Color( 1, 0.41, 0.71, 1 )"> + Hot pink color. </constant> <constant name="indianred" value="Color( 0.8, 0.36, 0.36, 1 )"> + Indian red color. </constant> <constant name="indigo" value="Color( 0.29, 0, 0.51, 1 )"> + Indigo color. </constant> <constant name="ivory" value="Color( 1, 1, 0.94, 1 )"> + Ivory color. </constant> <constant name="khaki" value="Color( 0.94, 0.9, 0.55, 1 )"> + Khaki color. </constant> <constant name="lavender" value="Color( 0.9, 0.9, 0.98, 1 )"> + Lavender color. </constant> <constant name="lavenderblush" value="Color( 1, 0.94, 0.96, 1 )"> + Lavender blush color. </constant> <constant name="lawngreen" value="Color( 0.49, 0.99, 0, 1 )"> + Lawn green color. </constant> <constant name="lemonchiffon" value="Color( 1, 0.98, 0.8, 1 )"> + Lemon chiffon color. </constant> <constant name="lightblue" value="Color( 0.68, 0.85, 0.9, 1 )"> + Light blue color. </constant> <constant name="lightcoral" value="Color( 0.94, 0.5, 0.5, 1 )"> + Light coral color. </constant> <constant name="lightcyan" value="Color( 0.88, 1, 1, 1 )"> + Light cyan color. </constant> <constant name="lightgoldenrod" value="Color( 0.98, 0.98, 0.82, 1 )"> + Light goldenrod color. </constant> <constant name="lightgray" value="Color( 0.83, 0.83, 0.83, 1 )"> + Light gray color. </constant> <constant name="lightgreen" value="Color( 0.56, 0.93, 0.56, 1 )"> + Light green color. </constant> <constant name="lightpink" value="Color( 1, 0.71, 0.76, 1 )"> + Light pink color. </constant> <constant name="lightsalmon" value="Color( 1, 0.63, 0.48, 1 )"> + Light salmon color. </constant> <constant name="lightseagreen" value="Color( 0.13, 0.7, 0.67, 1 )"> + Light sea green color. </constant> <constant name="lightskyblue" value="Color( 0.53, 0.81, 0.98, 1 )"> + Light sky blue color. </constant> <constant name="lightslategray" value="Color( 0.47, 0.53, 0.6, 1 )"> + Light slate gray color. </constant> <constant name="lightsteelblue" value="Color( 0.69, 0.77, 0.87, 1 )"> + Light steel blue color. </constant> <constant name="lightyellow" value="Color( 1, 1, 0.88, 1 )"> + Light yellow color. </constant> <constant name="lime" value="Color( 0, 1, 0, 1 )"> + Lime color. </constant> <constant name="limegreen" value="Color( 0.2, 0.8, 0.2, 1 )"> + Lime green color. </constant> <constant name="linen" value="Color( 0.98, 0.94, 0.9, 1 )"> + Linen color. </constant> <constant name="magenta" value="Color( 1, 0, 1, 1 )"> + Magenta color. </constant> <constant name="maroon" value="Color( 0.69, 0.19, 0.38, 1 )"> + Maroon color. </constant> <constant name="mediumaquamarine" value="Color( 0.4, 0.8, 0.67, 1 )"> + Medium aquamarine color. </constant> <constant name="mediumblue" value="Color( 0, 0, 0.8, 1 )"> + Medium blue color. </constant> <constant name="mediumorchid" value="Color( 0.73, 0.33, 0.83, 1 )"> + Medium orchid color. </constant> <constant name="mediumpurple" value="Color( 0.58, 0.44, 0.86, 1 )"> + Medium purple color. </constant> <constant name="mediumseagreen" value="Color( 0.24, 0.7, 0.44, 1 )"> + Medium sea green color. </constant> <constant name="mediumslateblue" value="Color( 0.48, 0.41, 0.93, 1 )"> + Medium slate blue color. </constant> <constant name="mediumspringgreen" value="Color( 0, 0.98, 0.6, 1 )"> + Medium spring green color. </constant> <constant name="mediumturquoise" value="Color( 0.28, 0.82, 0.8, 1 )"> + Medium turquoise color. </constant> <constant name="mediumvioletred" value="Color( 0.78, 0.08, 0.52, 1 )"> + Medium violet red color. </constant> <constant name="midnightblue" value="Color( 0.1, 0.1, 0.44, 1 )"> + Midnight blue color. </constant> <constant name="mintcream" value="Color( 0.96, 1, 0.98, 1 )"> + Mint cream color. </constant> <constant name="mistyrose" value="Color( 1, 0.89, 0.88, 1 )"> + Misty rose color. </constant> <constant name="moccasin" value="Color( 1, 0.89, 0.71, 1 )"> + Moccasin color. </constant> <constant name="navajowhite" value="Color( 1, 0.87, 0.68, 1 )"> + Navajo white color. </constant> <constant name="navyblue" value="Color( 0, 0, 0.5, 1 )"> + Navy blue color. </constant> <constant name="oldlace" value="Color( 0.99, 0.96, 0.9, 1 )"> + Old lace color. </constant> <constant name="olive" value="Color( 0.5, 0.5, 0, 1 )"> + Olive color. </constant> <constant name="olivedrab" value="Color( 0.42, 0.56, 0.14, 1 )"> + Olive drab color. </constant> <constant name="orange" value="Color( 1, 0.65, 0, 1 )"> + Orange color. </constant> <constant name="orangered" value="Color( 1, 0.27, 0, 1 )"> + Orange red color. </constant> <constant name="orchid" value="Color( 0.85, 0.44, 0.84, 1 )"> + Orchid color. </constant> <constant name="palegoldenrod" value="Color( 0.93, 0.91, 0.67, 1 )"> + Pale goldenrod color. </constant> <constant name="palegreen" value="Color( 0.6, 0.98, 0.6, 1 )"> + Pale green color. </constant> <constant name="paleturquoise" value="Color( 0.69, 0.93, 0.93, 1 )"> + Pale turquoise color. </constant> <constant name="palevioletred" value="Color( 0.86, 0.44, 0.58, 1 )"> + Pale violet red color. </constant> <constant name="papayawhip" value="Color( 1, 0.94, 0.84, 1 )"> + Papaya whip color. </constant> <constant name="peachpuff" value="Color( 1, 0.85, 0.73, 1 )"> + Peach puff color. </constant> <constant name="peru" value="Color( 0.8, 0.52, 0.25, 1 )"> + Peru color. </constant> <constant name="pink" value="Color( 1, 0.75, 0.8, 1 )"> + Pink color. </constant> <constant name="plum" value="Color( 0.87, 0.63, 0.87, 1 )"> + Plum color. </constant> <constant name="powderblue" value="Color( 0.69, 0.88, 0.9, 1 )"> + Powder blue color. </constant> <constant name="purple" value="Color( 0.63, 0.13, 0.94, 1 )"> + Purple color. </constant> <constant name="rebeccapurple" value="Color( 0.4, 0.2, 0.6, 1 )"> + Rebecca purple color. </constant> <constant name="red" value="Color( 1, 0, 0, 1 )"> + Red color. </constant> <constant name="rosybrown" value="Color( 0.74, 0.56, 0.56, 1 )"> + Rosy brown color. </constant> <constant name="royalblue" value="Color( 0.25, 0.41, 0.88, 1 )"> + Royal blue color. </constant> <constant name="saddlebrown" value="Color( 0.55, 0.27, 0.07, 1 )"> + Saddle brown color. </constant> <constant name="salmon" value="Color( 0.98, 0.5, 0.45, 1 )"> + Salmon color. </constant> <constant name="sandybrown" value="Color( 0.96, 0.64, 0.38, 1 )"> + Sandy brown color. </constant> <constant name="seagreen" value="Color( 0.18, 0.55, 0.34, 1 )"> + Sea green color. </constant> <constant name="seashell" value="Color( 1, 0.96, 0.93, 1 )"> + Seashell color. </constant> <constant name="sienna" value="Color( 0.63, 0.32, 0.18, 1 )"> + Sienna color. </constant> <constant name="silver" value="Color( 0.75, 0.75, 0.75, 1 )"> + Silver color. </constant> <constant name="skyblue" value="Color( 0.53, 0.81, 0.92, 1 )"> + Sky blue color. </constant> <constant name="slateblue" value="Color( 0.42, 0.35, 0.8, 1 )"> + Slate blue color. </constant> <constant name="slategray" value="Color( 0.44, 0.5, 0.56, 1 )"> + Slate gray color. </constant> <constant name="snow" value="Color( 1, 0.98, 0.98, 1 )"> + Snow color. </constant> <constant name="springgreen" value="Color( 0, 1, 0.5, 1 )"> + Spring green color. </constant> <constant name="steelblue" value="Color( 0.27, 0.51, 0.71, 1 )"> + Steel blue color. </constant> <constant name="tan" value="Color( 0.82, 0.71, 0.55, 1 )"> + Tan color. </constant> <constant name="teal" value="Color( 0, 0.5, 0.5, 1 )"> + Teal color. </constant> <constant name="thistle" value="Color( 0.85, 0.75, 0.85, 1 )"> + Thistle color. </constant> <constant name="tomato" value="Color( 1, 0.39, 0.28, 1 )"> + Tomato color. </constant> <constant name="transparent" value="Color( 1, 1, 1, 0 )"> + Transparent color (white with no alpha). </constant> <constant name="turquoise" value="Color( 0.25, 0.88, 0.82, 1 )"> + Turquoise color. </constant> <constant name="violet" value="Color( 0.93, 0.51, 0.93, 1 )"> + Violet color. </constant> <constant name="webgray" value="Color( 0.5, 0.5, 0.5, 1 )"> + Web gray color. </constant> <constant name="webgreen" value="Color( 0, 0.5, 0, 1 )"> + Web green color. </constant> <constant name="webmaroon" value="Color( 0.5, 0, 0, 1 )"> + Web maroon color. </constant> <constant name="webpurple" value="Color( 0.5, 0, 0.5, 1 )"> + Web purple color. </constant> <constant name="wheat" value="Color( 0.96, 0.87, 0.7, 1 )"> + Wheat color. </constant> <constant name="white" value="Color( 1, 1, 1, 1 )"> + White color. </constant> <constant name="whitesmoke" value="Color( 0.96, 0.96, 0.96, 1 )"> + White smoke color. </constant> <constant name="yellow" value="Color( 1, 1, 0, 1 )"> + Yellow color. </constant> <constant name="yellowgreen" value="Color( 0.6, 0.8, 0.2, 1 )"> + Yellow green color. </constant> </constants> </class> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 07ce76fdb2..d315c6a387 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.2"> +<class name="ColorPicker" inherits="BoxContainer" version="4.0"> <brief_description> Color picker control. </brief_description> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index e8c78fb6bf..d9023a4f3a 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ColorPickerButton" inherits="Button" category="Core" version="3.2"> +<class name="ColorPickerButton" inherits="Button" version="4.0"> <brief_description> Button that pops out a [ColorPicker]. </brief_description> @@ -43,10 +43,12 @@ </signal> <signal name="picker_created"> <description> + Emitted when the [ColorPicker] is created (the button is pressed for the first time). </description> </signal> <signal name="popup_closed"> <description> + Emitted when the [ColorPicker] is closed. </description> </signal> </signals> @@ -54,28 +56,40 @@ </constants> <theme_items> <theme_item name="bg" type="Texture"> + The background of the color preview rect on the button. </theme_item> <theme_item name="disabled" type="StyleBox"> + [StyleBox] used when the [ColorPickerButton] is disabled. </theme_item> <theme_item name="focus" type="StyleBox"> + [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> <theme_item name="font" type="Font"> + [Font] of the [ColorPickerButton]'s text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Default text [Color] of the [ColorPickerButton]. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )"> + Text [Color] used when the [ColorPickerButton] is disabled. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [ColorPickerButton] is being hovered. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )"> + Text [Color] used when the [ColorPickerButton] is being pressed. </theme_item> <theme_item name="hover" type="StyleBox"> + [StyleBox] used when the [ColorPickerButton] is being hovered. </theme_item> <theme_item name="hseparation" type="int" default="2"> + The horizontal space between [ColorPickerButton]'s icon and text. </theme_item> <theme_item name="normal" type="StyleBox"> + Default [StyleBox] for the [ColorPickerButton]. </theme_item> <theme_item name="pressed" type="StyleBox"> + [StyleBox] used when the [ColorPickerButton] is being pressed. </theme_item> </theme_items> </class> diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml index 2ff0a7eee3..92f42b6dd3 100644 --- a/doc/classes/ColorRect.xml +++ b/doc/classes/ColorRect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ColorRect" inherits="Control" category="Core" version="3.2"> +<class name="ColorRect" inherits="Control" version="4.0"> <brief_description> Colored rectangle. </brief_description> diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml index a09b5005b9..3ae07ee52f 100644 --- a/doc/classes/ConcavePolygonShape.xml +++ b/doc/classes/ConcavePolygonShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ConcavePolygonShape" inherits="Shape" category="Core" version="3.2"> +<class name="ConcavePolygonShape" inherits="Shape" version="4.0"> <brief_description> Concave polygon shape. </brief_description> diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml index a6fe2486ea..6fb32436a8 100644 --- a/doc/classes/ConcavePolygonShape2D.xml +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ConcavePolygonShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="ConcavePolygonShape2D" inherits="Shape2D" version="4.0"> <brief_description> Concave polygon 2D shape resource for physics. </brief_description> diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml index 4c95a4bef9..8682391a73 100644 --- a/doc/classes/ConeTwistJoint.xml +++ b/doc/classes/ConeTwistJoint.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ConeTwistJoint" inherits="Joint" category="Core" version="3.2"> +<class name="ConeTwistJoint" inherits="Joint" version="4.0"> <brief_description> A twist joint between two 3D bodies. </brief_description> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 56f54e4434..ad36f1f1c3 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ConfigFile" inherits="Reference" category="Core" version="3.2"> +<class name="ConfigFile" inherits="Reference" version="4.0"> <brief_description> Helper class to handle INI-style files. </brief_description> @@ -26,6 +26,7 @@ config.save("user://settings.cfg") [/codeblock] Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. + ConfigFiles can also contain manually written comment lines starting with a semicolon ([code];[/code]). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action. </description> <tutorials> </tutorials> @@ -104,7 +105,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. + Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="load_encrypted"> @@ -127,13 +129,24 @@ <description> </description> </method> + <method name="parse"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="data" type="String"> + </argument> + <description> + Parses the the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). + </description> + </method> <method name="save"> <return type="int" enum="Error"> </return> <argument index="0" name="path" type="String"> </argument> <description> - Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. + Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="save_encrypted"> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 8a8d1ed9e8..801d9508dd 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -1,10 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ConfirmationDialog" inherits="AcceptDialog" category="Core" version="3.2"> +<class name="ConfirmationDialog" inherits="AcceptDialog" version="4.0"> <brief_description> Dialog for confirmation of actions. </brief_description> <description> Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order). + To get cancel action, you can use: + [codeblock] + get_cancel().connect("pressed", self, "cancelled") + [/codeblock]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml index 8a3aac88b5..c285b448d8 100644 --- a/doc/classes/Container.xml +++ b/doc/classes/Container.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Container" inherits="Control" category="Core" version="3.2"> +<class name="Container" inherits="Control" version="4.0"> <brief_description> Base node for containers. </brief_description> @@ -29,6 +29,9 @@ </description> </method> </methods> + <members> + <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" /> + </members> <signals> <signal name="sort_children"> <description> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 75d5a72fb1..556ebb93bf 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Control" inherits="CanvasItem" category="Core" version="3.2"> +<class name="Control" inherits="CanvasItem" version="4.0"> <brief_description> All user interface nodes inherit from Control. A control's anchors and margins adapt its position and size relative to its parent. </brief_description> @@ -504,7 +504,7 @@ <description> Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control. If not overridden, default behavior is checking if the point is within control's Rect. - [b]Node:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. + [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. </description> </method> <method name="has_shader_override" qualifiers="const"> diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml index d15a0a7336..544f304051 100644 --- a/doc/classes/ConvexPolygonShape.xml +++ b/doc/classes/ConvexPolygonShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ConvexPolygonShape" inherits="Shape" category="Core" version="3.2"> +<class name="ConvexPolygonShape" inherits="Shape" version="4.0"> <brief_description> Convex polygon shape for 3D physics. </brief_description> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index 050ca23e05..e17048e061 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="ConvexPolygonShape2D" inherits="Shape2D" version="4.0"> <brief_description> Convex polygon shape for 2D physics. </brief_description> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index bce7895973..fb373145f9 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Crypto" inherits="Reference" category="Core" version="3.2"> +<class name="Crypto" inherits="Reference" version="4.0"> <brief_description> Access to advanced cryptographic functionalities. </brief_description> @@ -22,6 +22,7 @@ key.save("user://generated.key") cert.save("user://generated.crt") [/codeblock] + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 8c825c9e1c..fe7f4b63f0 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CryptoKey" inherits="Resource" category="Core" version="3.2"> +<class name="CryptoKey" inherits="Resource" version="4.0"> <brief_description> A cryptographic key (RSA). </brief_description> <description> The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource]. They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate. + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml index 2cedc78499..78731a7cd0 100644 --- a/doc/classes/CubeMap.xml +++ b/doc/classes/CubeMap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CubeMap" inherits="Resource" category="Core" version="3.2"> +<class name="CubeMap" inherits="Resource" version="4.0"> <brief_description> A CubeMap is a 6-sided 3D texture. </brief_description> @@ -22,7 +22,7 @@ <argument index="0" name="side" type="int" enum="CubeMap.Side"> </argument> <description> - Returns an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5. + Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. </description> </method> <method name="get_width" qualifiers="const"> @@ -40,19 +40,19 @@ <argument index="1" name="image" type="Image"> </argument> <description> - Sets an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5. + Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. </description> </method> </methods> <members> <member name="flags" type="int" setter="set_flags" getter="get_flags" default="7"> - The render flags for the [CubeMap]. See the [code]FLAG_*[/code] constants for details. + The render flags for the [CubeMap]. See the [enum Flags] constants for details. </member> <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7"> - The lossy storage quality of the [CubeMap] if the storage mode is set to STORAGE_COMPRESS_LOSSY. + The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY]. </member> <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0"> - The [CubeMap]'s storage mode. See [code]STORAGE_*[/code] constants. + The [CubeMap]'s storage mode. See [enum Storage] constants. </member> </members> <constants> diff --git a/doc/classes/CubeMesh.xml b/doc/classes/CubeMesh.xml index 67e559ab07..1f64b4a21f 100644 --- a/doc/classes/CubeMesh.xml +++ b/doc/classes/CubeMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CubeMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="CubeMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Generate an axis-aligned cuboid [PrimitiveMesh]. </brief_description> diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index 0fb559296e..26872e1f8e 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Curve" inherits="Resource" category="Core" version="3.2"> +<class name="Curve" inherits="Resource" version="4.0"> <brief_description> A mathematic curve. </brief_description> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 4e449a2032..f6eacfb33b 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Curve2D" inherits="Resource" category="Core" version="3.2"> +<class name="Curve2D" inherits="Resource" version="4.0"> <brief_description> Describes a Bézier curve in 2D space. </brief_description> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 4a0873a986..52b0052908 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Curve3D" inherits="Resource" category="Core" version="3.2"> +<class name="Curve3D" inherits="Resource" version="4.0"> <brief_description> Describes a Bézier curve in 3D space. </brief_description> diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml index e8df560a4c..10c7a4a086 100644 --- a/doc/classes/CurveTexture.xml +++ b/doc/classes/CurveTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CurveTexture" inherits="Texture" category="Core" version="3.2"> +<class name="CurveTexture" inherits="Texture" version="4.0"> <brief_description> A texture that shows a curve. </brief_description> diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml index 8e9397791a..3a81e98c3a 100644 --- a/doc/classes/CylinderMesh.xml +++ b/doc/classes/CylinderMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CylinderMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="CylinderMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Class representing a cylindrical [PrimitiveMesh]. </brief_description> diff --git a/doc/classes/CylinderShape.xml b/doc/classes/CylinderShape.xml index 5dff156775..54adbd3b04 100644 --- a/doc/classes/CylinderShape.xml +++ b/doc/classes/CylinderShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="CylinderShape" inherits="Shape" category="Core" version="3.2"> +<class name="CylinderShape" inherits="Shape" version="4.0"> <brief_description> Cylinder shape for collisions. </brief_description> diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml index 270d948f5e..e1b6bb6866 100644 --- a/doc/classes/DampedSpringJoint2D.xml +++ b/doc/classes/DampedSpringJoint2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="DampedSpringJoint2D" inherits="Joint2D" category="Core" version="3.2"> +<class name="DampedSpringJoint2D" inherits="Joint2D" version="4.0"> <brief_description> Damped spring constraint for 2D physics. </brief_description> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 7cb6b1b754..8432744ea7 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -1,19 +1,64 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Dictionary" category="Built-In Types" version="3.2"> +<class name="Dictionary" version="4.0"> <brief_description> Dictionary type. </brief_description> <description> - Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. + Dictionary type. Associative container which contains values referenced by unique keys. Dictionary are composed of pairs of keys (which must be unique) and values. You can define a dictionary by placing a comma separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. Erasing elements while iterating over them [b]is not supported[/b]. Creating a dictionary: [codeblock] - var d = {4: 5, "A key": "A value", 28: [1, 2, 3]} + var my_dir = {} # Creates an empty dictionary. + var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} + var my_dir = { + key1: value1, + key2: value2, + key3: value3, + } + [/codeblock] + You can access values of a dictionary by referencing appropriate key in above example [code]points_dir["White"][/code] would return value of 50. + [codeblock] + export(String, "White", "Yellow", "Orange") var my_color + var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} + + func _ready(): + var points = points_dir[my_color] + [/codeblock] + In the above code [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code]. + Dictionaries can contain more complex data: + [codeblock] + my_dir = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key. [/codeblock] To add a key to an existing dictionary, access it like an existing key and assign to it: [codeblock] - d[4] = "hello" # Add integer 4 as a key and assign the String "hello" as its value. - d["Godot"] = 3.01 # Add String "Godot" as a key and assign the value 3.01 to it. + var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} + var points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. + [/codeblock] + Finally, dictionaries can contain different types of keys and values in the same dictionary: + [codeblock] + var my_dir = {"String Key": 5, 4: [1, 2, 3], 7: "Hello"} # This is a valid dictionary. + [/codeblock] + [b]Note:[/b] Unlike [Array]s you can't compare dictionaries directly: + [codeblock] + array1 = [1, 2, 3] + array2 = [1, 2, 3] + + func compare_arrays(): + print(array1 == array2) # Will print true. + + dir1 = {"a": 1, "b": 2, "c": 3} + dir2 = {"a": 1, "b": 2, "c": 3} + + func compare_dictionaries(): + print(dir1 == dir2) # Will NOT print true. + [/codeblock] + You need to first calculate the dictionary's hash with [method hash] before you can compare them: + [codeblock] + dir1 = {"a": 1, "b": 2, "c": 3} + dir2 = {"a": 1, "b": 2, "c": 3} + + func compare_dictionaries(): + print(dir1.hash() == dir2.hash()) # Will print true. [/codeblock] </description> <tutorials> diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index 502256ae63..8dddf921d3 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="DirectionalLight" inherits="Light" category="Core" version="3.2"> +<class name="DirectionalLight" inherits="Light" version="4.0"> <brief_description> Directional light from a distance, as from the Sun. </brief_description> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 8aae85563a..ed4257a809 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Directory" inherits="Reference" category="Core" version="3.2"> +<class name="Directory" inherits="Reference" version="4.0"> <brief_description> Type used to handle the filesystem. </brief_description> <description> Directory type. It is used to manage directories and their content (not restricted to the project folder). + When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking. Here is an example on how to iterate through the files of a directory: [codeblock] func dir_contents(path): @@ -12,7 +13,7 @@ if dir.open(path) == OK: dir.list_dir_begin() var file_name = dir.get_next() - while (file_name != ""): + while file_name != "": if dir.current_is_dir(): print("Found directory: " + file_name) else: @@ -33,7 +34,7 @@ </argument> <description> Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="copy"> @@ -45,7 +46,7 @@ </argument> <description> Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="current_is_dir" qualifiers="const"> @@ -145,7 +146,7 @@ </argument> <description> Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="make_dir_recursive"> @@ -155,7 +156,7 @@ </argument> <description> Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. - Returns one of the error code constants defined in [@GlobalScope] ([code]0K[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="open"> @@ -165,7 +166,7 @@ </argument> <description> Opens an existing directory of the filesystem. The [code]path[/code] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="remove"> @@ -175,7 +176,7 @@ </argument> <description> Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. - Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="rename"> @@ -187,7 +188,7 @@ </argument> <description> Renames (move) the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> </methods> diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 0820d4e1b6..c2fb4d53cc 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="DynamicFont" inherits="Font" category="Core" version="3.2"> +<class name="DynamicFont" inherits="Font" version="4.0"> <brief_description> DynamicFont renders vector font files at runtime. </brief_description> <description> - DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. + DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. DynamicFont also supports defining one or more fallbacks fonts, which will be used when displaying a character not supported by the main font. + DynamicFont uses the [url=https://www.freetype.org/]FreeType[/url] library for rasterization. [codeblock] var dynamic_font = DynamicFont.new() dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf") @@ -46,6 +47,7 @@ <argument index="0" name="type" type="int"> </argument> <description> + Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). </description> </method> <method name="remove_fallback"> @@ -76,6 +78,7 @@ <argument index="1" name="value" type="int"> </argument> <description> + Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). </description> </method> </methods> @@ -96,17 +99,20 @@ The font data. </member> <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color( 1, 1, 1, 1 )"> + The font outline's color. + [b]Note:[/b] It's recommended to leave this at the default value so that you can adjust it in individual controls. For example, if the outline is made black here, it won't be possible to change its color using a Label's font outline modulate theme item. </member> <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0"> + The font outline's thickness in pixels (not relative to the font size). </member> <member name="size" type="int" setter="set_size" getter="get_size" default="16"> - The font size. + The font size in pixels. </member> <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" default="false"> - If [code]true[/code], filtering is used. + If [code]true[/code], filtering is used. This makes the font blurry instead of pixelated when scaling it if font oversampling is disabled or ineffective. It's recommended to enable this when using the font in a control whose size changes over time, unless a pixel art aesthetic is desired. </member> <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" default="false"> - If [code]true[/code], mipmapping is used. + If [code]true[/code], mipmapping is used. This improves the font's appearance when downscaling it if font oversampling is disabled or ineffective. </member> </members> <constants> diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml index ecdab32e80..2b4ec17bf1 100644 --- a/doc/classes/DynamicFontData.xml +++ b/doc/classes/DynamicFontData.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="DynamicFontData" inherits="Resource" category="Core" version="3.2"> +<class name="DynamicFontData" inherits="Resource" version="4.0"> <brief_description> Used with [DynamicFont] to describe the location of a font file. </brief_description> @@ -12,13 +12,13 @@ </methods> <members> <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true"> - Controls whether the font should be rendered with anti-aliasing. + If [code]true[/code], the font is rendered with anti-aliasing. </member> <member name="font_path" type="String" setter="set_font_path" getter="get_font_path" default=""""> The path to the vector font file. </member> <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="DynamicFontData.Hinting" default="2"> - The font hinting mode used by FreeType. + The font hinting mode used by FreeType. See [enum Hinting] for options. </member> </members> <constants> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 4e4e29dc4e..5de68cae71 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorExportPlugin" inherits="Reference" category="Core" version="3.2"> +<class name="EditorExportPlugin" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index 92622cc25d..5fac4f7822 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorFeatureProfile" inherits="Reference" category="Core" version="3.2"> +<class name="EditorFeatureProfile" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 6b1215949a..91adf6f2af 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core" version="3.2"> +<class name="EditorFileDialog" inherits="ConfirmationDialog" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 798658c8d0..a05fbf2be7 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorFileSystem" inherits="Node" category="Core" version="3.2"> +<class name="EditorFileSystem" inherits="Node" version="4.0"> <brief_description> Resource filesystem, as the editor sees it. </brief_description> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index cb2ed28b38..bbd3ee9b17 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorFileSystemDirectory" inherits="Object" category="Core" version="3.2"> +<class name="EditorFileSystemDirectory" inherits="Object" version="4.0"> <brief_description> A directory for the resource filesystem. </brief_description> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index 0da87a9371..0aac59c727 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorImportPlugin" inherits="ResourceImporter" category="Core" version="3.2"> +<class name="EditorImportPlugin" inherits="ResourceImporter" version="4.0"> <brief_description> Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type. </brief_description> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 450d2bf64c..61d240c1dc 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorInspector" inherits="ScrollContainer" category="Core" version="3.2"> +<class name="EditorInspector" inherits="ScrollContainer" version="4.0"> <brief_description> + A tab used to edit properties of the selected node. </brief_description> <description> + The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as the Sprite2D then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow. </description> <tutorials> </tutorials> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index a713e06585..eaddd9917c 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorInspectorPlugin" inherits="Reference" category="Core" version="3.2"> +<class name="EditorInspectorPlugin" inherits="Reference" version="4.0"> <brief_description> Plugin for adding custom property editors on inspector. </brief_description> @@ -100,7 +100,7 @@ <argument index="5" name="usage" type="int"> </argument> <description> - Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty] + Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. </description> </method> </methods> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 20ae0f3391..fea746f32d 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorInterface" inherits="Node" category="Core" version="3.2"> +<class name="EditorInterface" inherits="Node" version="4.0"> <brief_description> Godot editor's interface. </brief_description> diff --git a/doc/classes/EditorNavigationMeshGenerator.xml b/doc/classes/EditorNavigationMeshGenerator.xml index 3956e12509..1201b6cca1 100644 --- a/doc/classes/EditorNavigationMeshGenerator.xml +++ b/doc/classes/EditorNavigationMeshGenerator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorNavigationMeshGenerator" inherits="Object" category="Core" version="3.2"> +<class name="EditorNavigationMeshGenerator" inherits="Object" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 89e2f0580b..eaaa87c6f9 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorPlugin" inherits="Node" category="Core" version="3.2"> +<class name="EditorPlugin" inherits="Node" version="4.0"> <brief_description> Used by the editor to extend its functionality. </brief_description> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 5c24f0bebc..b93274491a 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorProperty" inherits="Container" category="Core" version="3.2"> +<class name="EditorProperty" inherits="Container" version="4.0"> <brief_description> Custom control to edit properties for adding into the inspector. </brief_description> @@ -113,7 +113,7 @@ <signal name="property_changed"> <argument index="0" name="property" type="String"> </argument> - <argument index="1" name="value" type="Nil"> + <argument index="1" name="value" type="Variant"> </argument> <description> Do not emit this manually, use the [method emit_changed] method instead. @@ -138,7 +138,7 @@ <signal name="property_keyed_with_value"> <argument index="0" name="property" type="String"> </argument> - <argument index="1" name="value" type="Nil"> + <argument index="1" name="value" type="Variant"> </argument> <description> Emit it if you want to key a property with a single value. diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml index 2638836c68..1976eb802c 100644 --- a/doc/classes/EditorResourceConversionPlugin.xml +++ b/doc/classes/EditorResourceConversionPlugin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.2"> +<class name="EditorResourceConversionPlugin" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 9d3f4b0b12..8e0f8842e9 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorResourcePreview" inherits="Node" category="Core" version="3.2"> +<class name="EditorResourcePreview" inherits="Node" version="4.0"> <brief_description> Helper to generate previews of resources or files. </brief_description> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index 4e61943c8f..0436f7ce06 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorResourcePreviewGenerator" inherits="Reference" category="Core" version="3.2"> +<class name="EditorResourcePreviewGenerator" inherits="Reference" version="4.0"> <brief_description> Custom generator of previews. </brief_description> diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml index 96d8ce698d..db85b859e5 100644 --- a/doc/classes/EditorSceneImporter.xml +++ b/doc/classes/EditorSceneImporter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSceneImporter" inherits="Reference" category="Core" version="3.2"> +<class name="EditorSceneImporter" inherits="Reference" version="4.0"> <brief_description> Imports scenes from third-parties' 3D files. </brief_description> diff --git a/doc/classes/EditorSceneImporterAssimp.xml b/doc/classes/EditorSceneImporterAssimp.xml index e2d73be870..c72d4ee25a 100644 --- a/doc/classes/EditorSceneImporterAssimp.xml +++ b/doc/classes/EditorSceneImporterAssimp.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" category="Core" version="3.2"> +<class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" version="4.0"> <brief_description> - Multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. + FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. </brief_description> <description> - This is a multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. See [url=https://assimp-docs.readthedocs.io/en/latest/about/intoduction.html#installation]this page[/url] for a full list of supported formats. + This is an FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. It currently has many known limitations and works best with static meshes. Most animated meshes won't import correctly. If exporting a FBX scene from Autodesk Maya, use these FBX export settings: [codeblock] - Smoothing Groups diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index df6cdd4b35..56fc0e3d1a 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.2"> +<class name="EditorScenePostImport" inherits="Reference" version="4.0"> <brief_description> Post-processes scenes after import. </brief_description> diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml index 981e0a6180..410301351f 100644 --- a/doc/classes/EditorScript.xml +++ b/doc/classes/EditorScript.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorScript" inherits="Reference" category="Core" version="3.2"> +<class name="EditorScript" inherits="Reference" version="4.0"> <brief_description> Base script that can be used to add extension functions to the editor. </brief_description> diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index 57df71ab01..caafd3c15f 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSelection" inherits="Object" category="Core" version="3.2"> +<class name="EditorSelection" inherits="Object" version="4.0"> <brief_description> Manages the SceneTree selection in the editor. </brief_description> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 5395a8fcb0..30fc1e0c7b 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSettings" inherits="Resource" category="Core" version="3.2"> +<class name="EditorSettings" inherits="Resource" version="4.0"> <brief_description> Object that holds the project-independent editor settings. </brief_description> @@ -21,7 +21,10 @@ <argument index="0" name="info" type="Dictionary"> </argument> <description> - Adds a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + Adds a custom property info to a property. The dictionary must contain: + - [code]name[/code]: [String] (the name of the property) + - [code]type[/code]: [int] (see [enum Variant.Type]) + - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] [b]Example:[/b] [codeblock] editor_settings.set("category/property_name", 0) diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index 22e4a21757..e7c5ca9c0f 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSpatialGizmo" inherits="SpatialGizmo" category="Core" version="3.2"> +<class name="EditorSpatialGizmo" inherits="SpatialGizmo" version="4.0"> <brief_description> Custom gizmo for editing Spatial objects. </brief_description> @@ -51,6 +51,8 @@ </argument> <argument index="2" name="billboard" type="bool" default="false"> </argument> + <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> <description> Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw]. </description> @@ -76,6 +78,8 @@ </argument> <argument index="1" name="default_scale" type="float" default="1"> </argument> + <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + </argument> <description> Adds an unscaled billboard for visualization. Call this function during [method redraw]. </description> diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml index 777d558a8e..eba75438b9 100644 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSpatialGizmoPlugin" inherits="Resource" category="Core" version="3.2"> +<class name="EditorSpatialGizmoPlugin" inherits="Resource" version="4.0"> <brief_description> Used by the editor to define Spatial gizmo types. </brief_description> @@ -49,7 +49,7 @@ <argument index="0" name="spatial" type="Spatial"> </argument> <description> - Override this method to return a custom [EditorSpatialGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. (See also [method has_gizmo]) + Override this method to return a custom [EditorSpatialGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method has_gizmo]. </description> </method> <method name="create_handle_material"> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index bf01ebfe82..381f4fae04 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorSpinSlider" inherits="Range" category="Core" version="3.2"> +<class name="EditorSpinSlider" inherits="Range" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml index f67c1c9eb5..bb356c2183 100644 --- a/doc/classes/EditorVCSInterface.xml +++ b/doc/classes/EditorVCSInterface.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorVCSInterface" inherits="Object" category="Core" version="3.2"> +<class name="EditorVCSInterface" inherits="Object" version="4.0"> <brief_description> Version Control System (VCS) interface which reads and writes to the local VCS in use. </brief_description> @@ -34,13 +34,6 @@ - [code]"offset"[/code] to store the offset of the line change since the first contextual line content. </description> </method> - <method name="get_is_vcs_intialized"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code]. - </description> - </method> <method name="get_modified_files_data"> <return type="Dictionary"> </return> @@ -58,14 +51,14 @@ <return type="String"> </return> <description> - Return the project name of the VCS working directory + Returns the project name of the VCS working directory. </description> </method> <method name="get_vcs_name"> <return type="String"> </return> <description> - Return the name of the VCS if the VCS has been initialized, else return an empty string. + Returns the name of the VCS if the VCS has been initialized, else return an empty string. </description> </method> <method name="initialize"> @@ -74,7 +67,7 @@ <argument index="0" name="project_root_path" type="String"> </argument> <description> - Initialize the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns [code]true[/code] if no failure occurs, else returns [code]false[/code]. + Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns [code]true[/code] if no failure occurs, else returns [code]false[/code]. </description> </method> <method name="is_addon_ready"> @@ -84,6 +77,13 @@ Returns [code]true[/code] if the addon is ready to respond to function calls, else returns [code]false[/code]. </description> </method> + <method name="is_vcs_initialized"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code]. + </description> + </method> <method name="shut_down"> <return type="bool"> </return> @@ -97,7 +97,7 @@ <argument index="0" name="file_path" type="String"> </argument> <description> - Stage the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. + Stages the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. </description> </method> <method name="unstage_file"> @@ -106,7 +106,7 @@ <argument index="0" name="file_path" type="String"> </argument> <description> - Unstage the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. + Unstages the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. </description> </method> </methods> diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml index 7221aa845b..fc68b47645 100644 --- a/doc/classes/EncodedObjectAsID.xml +++ b/doc/classes/EncodedObjectAsID.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EncodedObjectAsID" inherits="Reference" category="Core" version="3.2"> +<class name="EncodedObjectAsID" inherits="Reference" version="4.0"> <brief_description> Holds a reference to an [Object]'s instance ID. </brief_description> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 187e13d7bd..8cdb9c1c3f 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Engine" inherits="Object" category="Core" version="3.2"> +<class name="Engine" inherits="Object" version="4.0"> <brief_description> Access to basic engine properties. </brief_description> @@ -41,7 +41,7 @@ <return type="int"> </return> <description> - Returns the total number of frames drawn. + Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_idle_frames]. </description> </method> <method name="get_frames_per_second" qualifiers="const"> @@ -51,6 +51,13 @@ Returns the frames per second of the running game. </description> </method> + <method name="get_idle_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of frames passed since engine initialization which is advanced on each [b]idle frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn]. + </description> + </method> <method name="get_license_info" qualifiers="const"> <return type="Dictionary"> </return> @@ -72,6 +79,13 @@ Returns the main loop object (see [MainLoop] and [SceneTree]). </description> </method> + <method name="get_physics_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. + </description> + </method> <method name="get_physics_interpolation_fraction" qualifiers="const"> <return type="float"> </return> @@ -85,6 +99,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments. </description> </method> <method name="get_version_info" qualifiers="const"> @@ -116,6 +131,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope. </description> </method> <method name="is_in_physics_frame" qualifiers="const"> @@ -134,6 +150,7 @@ The number of fixed iterations per second (for fixed process and physics). </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> + Controls how much physic ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. </member> <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 2b44eb81b1..da4b1d883a 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Environment" inherits="Resource" category="Core" version="3.2"> +<class name="Environment" inherits="Resource" version="4.0"> <brief_description> Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options. </brief_description> @@ -21,6 +21,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the glow level [code]idx[/code] is specified, [code]false[/code] otherwise. </description> </method> <method name="set_glow_level"> @@ -31,132 +32,133 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables or disables the glow level at index [code]idx[/code]. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. </description> </method> </methods> <members> <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0"> - Global brightness value of the rendered scene (default value is 1). + The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> - Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. + Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0"> - Global contrast value of the rendered scene (default value is 1). + The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false"> - Enables the adjustment_* options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene. + If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene. </member> <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> - Global color saturation value of the rendered scene (default value is 1). + The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color( 0, 0, 0, 1 )"> - [Color] of the ambient light. + The ambient light's [Color]. </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> - Energy of the ambient light. The higher the value, the stronger the light. + The ambient light's energy. The higher the value, the stronger the light. </member> <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0"> Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" default="false"> - Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. + If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. </member> <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0"> - Maximum luminance value for the auto exposure. + The maximum luminance value for the auto exposure. </member> <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05"> - Minimum luminance value for the auto exposure. + The minimum luminance value for the auto exposure. </member> <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4"> - Scale of the auto exposure effect. Affects the intensity of auto exposure. + The scale of the auto exposure effect. Affects the intensity of auto exposure. </member> <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5"> - Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. + The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. </member> <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1"> - The id of the camera feed to show in the background. + The ID of the camera feed to show in the background. </member> <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0"> - Maximum layer id (if using Layer background mode). + The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode. </member> <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )"> - Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). + The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant BG_COLOR_SKY] background modes). </member> <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> - Power of light emitted by the background. + The power of the light emitted by the background. </member> <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0"> - Defines the mode of background. + The background mode. See [enum BGMode] for possible values. </member> <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky"> - [Sky] resource defined as background. + The [Sky] resource defined as background. </member> <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> - [Sky] resource's custom field of view. + The [Sky] resource's custom field of view. </member> <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> - [Sky] resource's rotation expressed as a [Basis] + The [Sky] resource's rotation expressed as a [Basis]. </member> <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as euler angles in radians + The [Sky] resource's rotation expressed as Euler angles in radians. </member> <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as euler angles in degrees + The [Sky] resource's rotation expressed as Euler angles in degrees. </member> <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1"> - Amount of far blur. + The amount of far blur for the depth-of-field effect. </member> <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> - Distance from the camera where the far blur effect affects the rendering. + The distance from the camera where the far blur effect affects the rendering. </member> <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> - Enables the far blur effect. + If [code]true[/code], enables the depth-of-field far blur effect. </member> <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the far blur quality. + The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> - Transition between no-blur area and far blur. + The length of the transition between the no-blur area and far blur. </member> <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" default="0.1"> - Amount of near blur. + The amount of near blur for the depth-of-field effect. </member> <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> Distance from the camera where the near blur effect affects the rendering. </member> <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> - Enables the near blur effect. + If [code]true[/code], enables the depth-of-field near blur effect. </member> <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the near blur quality. + The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> - Transition between near blur and no-blur area. + The length of the transition between the near blur and no-blur area. </member> <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" default="Color( 0.5, 0.6, 0.7, 1 )"> - Fog's [Color]. + The fog's [Color]. </member> <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" default="10.0"> - Fog's depth starting distance from the camera. + The fog's depth starting distance from the camera. </member> <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" default="1.0"> - Value defining the fog depth intensity. + The fog depth's intensity curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" default="true"> - Enables the fog depth. + If [code]true[/code], the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera). </member> <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end" default="100.0"> - Fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. + The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> - Enables the fog. Needs [member fog_height_enabled] and/or [member fog_depth_enabled] to actually display fog. + If [code]true[/code], fog effects are enabled. [member fog_height_enabled] and/or [member fog_depth_enabled] must be set to [code]true[/code] to actually display fog. </member> <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" default="1.0"> - Value defining the fog height intensity. + The height fog's intensity. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" default="false"> - Enables the fog height. + If [code]true[/code], the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader. </member> <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" default="0.0"> The Y coordinate where the height fog will be the most intense. If this value is greater than [member fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom. @@ -165,131 +167,151 @@ The Y coordinate where the height fog will be the least intense. If this value is greater than [member fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top. </member> <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" default="0.0"> - Amount of sun that affects the fog rendering. + The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene. </member> <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" default="Color( 1, 0.9, 0.7, 1 )"> - Sun [Color]. + The depth fog's [Color] when looking towards the sun. </member> <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" default="1.0"> - Amount of light that the fog transmits. + The intensity of the fog light transmittance effect. Amount of light that the fog transmits. </member> <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false"> - Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. + Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life. </member> <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false"> - Smooths out blockiness created by sampling higher levels. + Smooths out the blockiness created by sampling higher levels, at the cost of performance. + [b]Note:[/b] When using the GLES2 renderer, this is only available if the GPU supports the [code]GL_EXT_gpu_shader4[/code] extension. </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> - Glow blending mode. + The glow blending mode. </member> <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" default="0.0"> - Bloom value (global glow). + The bloom's intensity. If set to a value higher than [code]0[/code], this will make glow visible in areas darker than the [member glow_hdr_threshold]. </member> <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" default="false"> - Enables glow rendering. + If [code]true[/code], the glow effect is enabled. </member> <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap" default="12.0"> + The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. </member> <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale" default="2.0"> - Bleed scale of the HDR glow. + The bleed scale of the HDR glow. </member> <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0"> - Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. + The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case. </member> <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> - Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. + The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. </member> <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - First level of glow (most local). + If [code]true[/code], the 1st level of glow is enabled. This is the most "local" level (least blurry). </member> <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Second level of glow. + If [code]true[/code], the 2th level of glow is enabled. </member> <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Third level of glow. + If [code]true[/code], the 3th level of glow is enabled. </member> <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Fourth level of glow. + If [code]true[/code], the 4th level of glow is enabled. </member> <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Fifth level of glow. + If [code]true[/code], the 5th level of glow is enabled. </member> <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Sixth level of glow. + If [code]true[/code], the 6th level of glow is enabled. </member> <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Seventh level of glow (most global). + If [code]true[/code], the 7th level of glow is enabled. This is the most "global" level (blurriest). </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> - Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. + The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. </member> <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2"> + The depth tolerance for screen-space reflections. </member> <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false"> + If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. </member> <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15"> + The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). </member> <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0"> + The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. </member> <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" default="64"> + The maximum number of steps for screen-space reflections. Higher values are slower. </member> <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough" default="true"> + If [code]true[/code], screen-space reflections will take the material roughness into account. </member> <member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0"> + The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than [code]0[/code] will make the SSAO effect visible in areas darkened by AO textures. </member> <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" default="0.01"> + The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion. </member> <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3"> + The screen-space ambient occlusion blur quality. See [enum SSAOBlur] for possible values. </member> <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" default="Color( 0, 0, 0, 1 )"> + The screen-space ambient occlusion color. </member> <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0"> + The screen-space ambient occlusion edge sharpness. </member> <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" default="false"> + If [code]true[/code], the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues. </member> <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0"> + The primary screen-space ambient occlusion intensity. See also [member ssao_radius]. </member> <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" default="1.0"> + The secondary screen-space ambient occlusion intensity. See also [member ssao_radius2]. </member> <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0"> + The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than [code]0[/code] will make the SSAO effect visible in direct light. </member> <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality" default="1"> + The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower. </member> <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0"> + The primary screen-space ambient occlusion radius. </member> <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" default="0.0"> + The secondary screen-space ambient occlusion radius. If set to a value higher than [code]0[/code], enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance). </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> - Default exposure for tonemap. + The default exposure used for tonemapping. </member> <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0"> - Tonemapping mode. + The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) </member> <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0"> - White reference value for tonemap. + The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. </member> </members> <constants> <constant name="BG_KEEP" value="5" enum="BGMode"> - Keep on screen every pixel drawn in the background. + Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. </constant> <constant name="BG_CLEAR_COLOR" value="0" enum="BGMode"> - Clear the background using the project's clear color. + Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color]. </constant> <constant name="BG_COLOR" value="1" enum="BGMode"> - Clear the background using a custom clear color. + Clears the background using a custom clear color. </constant> <constant name="BG_SKY" value="2" enum="BGMode"> - Display a user-defined sky in the background. + Displays a user-defined sky in the background. </constant> <constant name="BG_COLOR_SKY" value="3" enum="BGMode"> - Clear the background using a custom clear color and allows defining a sky for shading and reflection. + Clears the background using a custom clear color and allows defining a sky for shading and reflection. This mode is slightly faster than [constant BG_SKY] and should be preferred in scenes where reflections can be visible, but the sky itself never is (e.g. top-down camera). </constant> <constant name="BG_CANVAS" value="4" enum="BGMode"> - Display a [CanvasLayer] in the background. + Displays a [CanvasLayer] in the background. </constant> <constant name="BG_CAMERA_FEED" value="6" enum="BGMode"> - Display a camera feed in the background. + Displays a camera feed in the background. </constant> <constant name="BG_MAX" value="7" enum="BGMode"> Represents the size of the [enum BGMode] enum. @@ -301,10 +323,10 @@ Screen glow blending mode. Increases brightness, used frequently with bloom. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="GlowBlendMode"> - Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. + Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="GlowBlendMode"> - Replace glow blending mode. Replaces all pixels' color by the glow value. + Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. </constant> <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> Linear tonemapper operator. Reads the linear data and passes it on unmodified. @@ -319,27 +341,34 @@ Academy Color Encoding System tonemapper operator. </constant> <constant name="DOF_BLUR_QUALITY_LOW" value="0" enum="DOFBlurQuality"> - Low depth-of-field blur quality. + Low depth-of-field blur quality (fastest). </constant> <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1" enum="DOFBlurQuality"> Medium depth-of-field blur quality. </constant> <constant name="DOF_BLUR_QUALITY_HIGH" value="2" enum="DOFBlurQuality"> - High depth-of-field blur quality. + High depth-of-field blur quality (slowest). </constant> <constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur"> + No blur for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_BLUR_1x1" value="1" enum="SSAOBlur"> + 1×1 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_2x2" value="2" enum="SSAOBlur"> + 2×2 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur"> + 3×3 blur for the screen-space ambient occlusion effect (slowest). </constant> <constant name="SSAO_QUALITY_LOW" value="0" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (slowest). </constant> </constants> </class> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index f85413b8b4..b0a2802e43 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Expression" inherits="Reference" category="Core" version="3.2"> +<class name="Expression" inherits="Reference" version="4.0"> <brief_description> A class that stores an expression you can execute. </brief_description> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 9eff0a4d27..7fa87c2b60 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="File" inherits="Reference" category="Core" version="3.2"> +<class name="File" inherits="Reference" version="4.0"> <brief_description> Type to handle file reading and writing operations. </brief_description> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index d8f4ca21c8..5cf252c173 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.2"> +<class name="FileDialog" inherits="ConfirmationDialog" version="4.0"> <brief_description> Dialog for selecting files or directories in the filesystem. </brief_description> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index f7de79913c..6543a3ecf1 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Font" inherits="Resource" category="Core" version="3.2"> +<class name="Font" inherits="Resource" version="4.0"> <brief_description> Internationalized font and text drawing support. </brief_description> @@ -91,6 +91,7 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the font has an outline. </description> </method> <method name="is_distance_field_hint" qualifiers="const"> diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml index 9803ae0838..37c3597a95 100644 --- a/doc/classes/FuncRef.xml +++ b/doc/classes/FuncRef.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="FuncRef" inherits="Reference" category="Core" version="3.2"> +<class name="FuncRef" inherits="Reference" version="4.0"> <brief_description> Reference to a function in an object. </brief_description> diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index a9192d1942..76d9620ecf 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GIProbe" inherits="VisualInstance" category="Core" version="3.2"> +<class name="GIProbe" inherits="VisualInstance" version="4.0"> <brief_description> + Real-time global illumination (GI) probe. </brief_description> <description> + [GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked. + Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/voxel_cone_tracing/high_quality]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link> @@ -16,45 +19,62 @@ <argument index="1" name="create_visual_debug" type="bool" default="false"> </argument> <description> + Bakes the effect from all [GeometryInstance]s marked with [member GeometryInstance.use_in_baked_light] and [Light]s marked with either [constant Light.BAKE_INDIRECT] or [constant Light.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. </description> </method> <method name="debug_bake"> <return type="void"> </return> <description> + Calls [method bake] with [code]create_visual_debug[/code] enabled. </description> </method> </methods> <members> <member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5"> + Offsets the lookup of the light contribution from the [GIProbe]. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and [member normal_bias] should be played around with to minimize self-shadowing and light leaking. + [b]Note:[/b] [code]bias[/code] should usually be above 1.0 as that is the size of the voxels. </member> <member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false"> + If [code]true[/code], the data for this [GIProbe] will be compressed. Compression saves space, but results in far worse visual quality. </member> <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data"> + The [GIProbeData] resource that holds the data for this [GIProbe]. </member> <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="4"> + The maximum brightness that the [GIProbe] will recognize. Brightness will be scaled within this range. </member> <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> + Energy multiplier. Makes the lighting contribution from the [GIProbe] brighter. </member> <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )"> + The size of the area covered by the [GIProbe]. If you make the extents larger without increasing the subdivisions with [member subdiv], the size of each cell will increase and result in lower detailed lighting. </member> <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false"> + If [code]true[/code], ignores the sky contribution when calculating lighting. </member> <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0"> + Offsets the lookup into the [GIProbe] based on the object's normal direction. Can be used to reduce some self-shadowing artifacts. </member> <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7"> + How much light propagates through the probe internally. A higher value allows light to spread further. </member> <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1"> + Number of times to subdivide the grid that the [GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance. </member> </members> <constants> <constant name="SUBDIV_64" value="0" enum="Subdiv"> + Use 64 subdivisions. This is the lowest quality setting, but the fastest. Use it if you can, but especially use it on lower-end hardware. </constant> <constant name="SUBDIV_128" value="1" enum="Subdiv"> + Use 128 subdivisions. This is the default quality setting. </constant> <constant name="SUBDIV_256" value="2" enum="Subdiv"> + Use 256 subdivisions. </constant> <constant name="SUBDIV_512" value="3" enum="Subdiv"> + Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware this could cause the GPU to stall. </constant> <constant name="SUBDIV_MAX" value="4" enum="Subdiv"> Represents the size of the [enum Subdiv] enum. diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml index 84bd695f43..bb1ee4d054 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/GIProbeData.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GIProbeData" inherits="Resource" category="Core" version="3.2"> +<class name="GIProbeData" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml index bc34f3ac0d..29ebf9f5d6 100644 --- a/doc/classes/Generic6DOFJoint.xml +++ b/doc/classes/Generic6DOFJoint.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.2"> +<class name="Generic6DOFJoint" inherits="Joint" version="4.0"> <brief_description> The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. </brief_description> diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml index 3824baa4dc..739c860b28 100644 --- a/doc/classes/Geometry.xml +++ b/doc/classes/Geometry.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Geometry" inherits="Object" category="Core" version="3.2"> +<class name="Geometry" inherits="Object" version="4.0"> <brief_description> + Helper node to calculate generic geometry operations. </brief_description> <description> + Geometry provides users with a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations. </description> <tutorials> </tutorials> @@ -113,7 +115,7 @@ <argument index="2" name="s2" type="Vector3"> </argument> <description> - Returns the 3d point on the 3d segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. + Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. </description> </method> <method name="get_closest_point_to_segment_2d"> @@ -126,7 +128,7 @@ <argument index="2" name="s2" type="Vector2"> </argument> <description> - Returns the 2d point on the 2d segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. + Returns the 2D point on the 2D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. </description> </method> <method name="get_closest_point_to_segment_uncapped"> @@ -139,7 +141,7 @@ <argument index="2" name="s2" type="Vector3"> </argument> <description> - Returns the 3d point on the 3d line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. + Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. </description> </method> <method name="get_closest_point_to_segment_uncapped_2d"> @@ -152,7 +154,7 @@ <argument index="2" name="s2" type="Vector2"> </argument> <description> - Returns the 2d point on the 2d line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. + Returns the 2D point on the 2D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. </description> </method> <method name="get_closest_points_between_segments"> @@ -167,7 +169,7 @@ <argument index="3" name="q2" type="Vector3"> </argument> <description> - Given the two 3d segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). + Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). </description> </method> <method name="get_closest_points_between_segments_2d"> @@ -182,7 +184,7 @@ <argument index="3" name="q2" type="Vector2"> </argument> <description> - Given the two 2d segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). + Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PoolVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). </description> </method> <method name="get_uv84_normal_bit"> @@ -191,6 +193,7 @@ <argument index="0" name="normal" type="Vector3"> </argument> <description> + Used internally by the engine. </description> </method> <method name="intersect_polygons_2d"> @@ -348,7 +351,7 @@ <argument index="4" name="c" type="Vector3"> </argument> <description> - Tests if the 3d ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned. + Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned. </description> </method> <method name="segment_intersects_circle"> @@ -363,7 +366,7 @@ <argument index="3" name="circle_radius" type="float"> </argument> <description> - Given the 2d segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). + Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). </description> </method> <method name="segment_intersects_convex"> diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml index 02f2c27043..fccd75edad 100644 --- a/doc/classes/GeometryInstance.xml +++ b/doc/classes/GeometryInstance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.2"> +<class name="GeometryInstance" inherits="VisualInstance" version="4.0"> <brief_description> Base node for geometry-based visual instances. </brief_description> @@ -15,6 +15,7 @@ <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags"> </argument> <description> + Returns the [enum GeometryInstance.Flags] that have been set for this object. </description> </method> <method name="set_custom_aabb"> @@ -34,6 +35,7 @@ <argument index="1" name="value" type="bool"> </argument> <description> + Sets the [enum GeometryInstance.Flags] specified. See [enum GeometryInstance.Flags] for options. </description> </method> </methods> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index 247a7afe85..3ce70045ef 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Gradient" inherits="Resource" category="Core" version="3.2"> +<class name="Gradient" inherits="Resource" version="4.0"> <brief_description> A color interpolator resource which can be used to generate colors between user-defined color points. </brief_description> diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml index 3492b2e261..fc9c3fd1bb 100644 --- a/doc/classes/GradientTexture.xml +++ b/doc/classes/GradientTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GradientTexture" inherits="Texture" category="Core" version="3.2"> +<class name="GradientTexture" inherits="Texture" version="4.0"> <brief_description> Gradient-filled texture. </brief_description> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 80e9b152ef..e35fc2b7d1 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GraphEdit" inherits="Control" category="Core" version="3.2"> +<class name="GraphEdit" inherits="Control" version="4.0"> <brief_description> GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them. </brief_description> @@ -87,6 +87,8 @@ <return type="HBoxContainer"> </return> <description> + Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. + Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of it's children use their [member CanvasItem.visible] property instead. </description> </method> <method name="is_node_connected"> @@ -158,6 +160,7 @@ <argument index="4" name="amount" type="float"> </argument> <description> + Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property. </description> </method> <method name="set_selected"> @@ -192,12 +195,12 @@ <signals> <signal name="_begin_node_move"> <description> - Signal sent at the beginning of a GraphNode movement. + Emitted at the beginning of a GraphNode movement. </description> </signal> <signal name="_end_node_move"> <description> - Signal sent at the end of a GraphNode movement. + Emitted at the end of a GraphNode movement. </description> </signal> <signal name="connection_from_empty"> @@ -208,7 +211,7 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from input port into empty space of the graph. + Emitted when user dragging connection from input port into empty space of the graph. </description> </signal> <signal name="connection_request"> @@ -221,7 +224,7 @@ <argument index="3" name="to_slot" type="int"> </argument> <description> - Signal sent to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. + Emitted to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. </description> </signal> <signal name="connection_to_empty"> @@ -232,17 +235,17 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from output port into empty space of the graph. + Emitted when user dragging connection from output port into empty space of the graph. </description> </signal> <signal name="copy_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + C[/code]. + Emitted when the user presses [code]Ctrl + C[/code]. </description> </signal> <signal name="delete_nodes_request"> <description> - Signal sent when a GraphNode is attempted to be removed from the GraphEdit. + Emitted when a GraphNode is attempted to be removed from the GraphEdit. </description> </signal> <signal name="disconnection_request"> @@ -272,7 +275,7 @@ </signal> <signal name="paste_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + V[/code]. + Emitted when the user presses [code]Ctrl + V[/code]. </description> </signal> <signal name="popup_request"> @@ -286,6 +289,7 @@ <argument index="0" name="ofs" type="Vector2"> </argument> <description> + Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. </description> </signal> </signals> @@ -314,6 +318,10 @@ </theme_item> <theme_item name="reset" type="Texture"> </theme_item> + <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )"> + </theme_item> + <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )"> + </theme_item> <theme_item name="snap" type="Texture"> </theme_item> </theme_items> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 8470a346ff..cc6e3dc7f9 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GraphNode" inherits="Container" category="Core" version="3.2"> +<class name="GraphNode" inherits="Container" version="4.0"> <brief_description> - A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. + A GraphNode is a container with potentially several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. </brief_description> <description> - A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. + A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes referred to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any [Control]-derived child node to it. + After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further. + In the Inspector you can enable (show) or disable (hide) slots. By default all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections. </description> <tutorials> </tutorials> @@ -169,6 +171,12 @@ <argument index="8" name="custom_right" type="Texture" default="null"> </argument> <description> + Sets properties of the slot with ID [code]idx[/code]. + If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. + [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected. + [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side. + [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port. + [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. </description> </method> </methods> @@ -176,25 +184,33 @@ <member name="comment" type="bool" setter="set_comment" getter="is_comment" default="false"> If [code]true[/code], the GraphNode is a comment node. </member> + <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" /> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The offset of the GraphNode, relative to the scroll offset of the [GraphEdit]. [b]Note:[/b] You cannot use position directly, as [GraphEdit] is a [Container]. </member> <member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0"> + Sets the overlay shown above the GraphNode. See [enum Overlay]. </member> <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false"> + If [code]true[/code], the user can resize the GraphNode. + [b]Note:[/b] Dragging the handle will only emit the [signal resize_request] signal, the GraphNode needs to be resized manually. </member> <member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false"> + If [code]true[/code], the GraphNode is selected. </member> <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" default="false"> + If [code]true[/code], the close button will be visible. + [b]Note:[/b] Pressing it will only emit the [signal close_request] signal, the GraphNode needs to be removed manually. </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> + The text displayed in the GraphNode's title bar. </member> </members> <signals> <signal name="close_request"> <description> - Signal sent on closing the GraphNode. + Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see [member show_close]). </description> </signal> <signal name="dragged"> @@ -203,32 +219,36 @@ <argument index="1" name="to" type="Vector2"> </argument> <description> - Signal sent when the GraphNode is dragged. + Emitted when the GraphNode is dragged. </description> </signal> <signal name="offset_changed"> <description> - Signal sent when the GraphNode is moved. + Emitted when the GraphNode is moved. </description> </signal> <signal name="raise_request"> <description> - Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. + Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. </description> </signal> <signal name="resize_request"> <argument index="0" name="new_minsize" type="Vector2"> </argument> <description> + Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]). </description> </signal> </signals> <constants> <constant name="OVERLAY_DISABLED" value="0" enum="Overlay"> + No overlay is shown. </constant> <constant name="OVERLAY_BREAKPOINT" value="1" enum="Overlay"> + Show overlay set in the [code]breakpoint[/code] theme property. </constant> <constant name="OVERLAY_POSITION" value="2" enum="Overlay"> + Show overlay set in the [code]position[/code] theme property. </constant> </constants> <theme_items> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index e8c764f412..4493ee8dc1 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GridContainer" inherits="Container" category="Core" version="3.2"> +<class name="GridContainer" inherits="Container" version="4.0"> <brief_description> Grid container used to arrange elements in a grid like layout. </brief_description> @@ -15,7 +15,6 @@ <member name="columns" type="int" setter="set_columns" getter="get_columns" default="1"> The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its children to accommodate the new layout. </member> - <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="1" /> </members> <constants> </constants> diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml index 6b87fa5cfe..643b7aefea 100644 --- a/doc/classes/GrooveJoint2D.xml +++ b/doc/classes/GrooveJoint2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.2"> +<class name="GrooveJoint2D" inherits="Joint2D" version="4.0"> <brief_description> Groove constraint for 2D physics. </brief_description> diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml index e2abbe16cc..7c76b8b001 100644 --- a/doc/classes/HBoxContainer.xml +++ b/doc/classes/HBoxContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HBoxContainer" inherits="BoxContainer" category="Core" version="3.2"> +<class name="HBoxContainer" inherits="BoxContainer" version="4.0"> <brief_description> Horizontal box container. </brief_description> @@ -14,6 +14,7 @@ </constants> <theme_items> <theme_item name="separation" type="int" default="4"> + The horizontal space between the [HBoxContainer]'s elements. </theme_item> </theme_items> </class> diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml index 14ace8bc76..129e15b489 100644 --- a/doc/classes/HScrollBar.xml +++ b/doc/classes/HScrollBar.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HScrollBar" inherits="ScrollBar" category="Core" version="3.2"> +<class name="HScrollBar" inherits="ScrollBar" version="4.0"> <brief_description> Horizontal scroll bar. </brief_description> <description> - Horizontal scroll bar. See [ScrollBar]. This one goes from left (min) to right (max). + Horizontal version of [ScrollBar], which goes from left (min) to right (max). </description> <tutorials> </tutorials> @@ -14,22 +14,31 @@ </constants> <theme_items> <theme_item name="decrement" type="Texture"> + Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="decrement_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the decrement button. </theme_item> <theme_item name="grabber" type="StyleBox"> + Used as texture for the grabber, the draggable element representing current scroll. </theme_item> <theme_item name="grabber_highlight" type="StyleBox"> + Used when the mouse hovers over the grabber. </theme_item> <theme_item name="grabber_pressed" type="StyleBox"> + Used when the grabber is being dragged. </theme_item> <theme_item name="increment" type="Texture"> + Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="increment_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the increment button. </theme_item> <theme_item name="scroll" type="StyleBox"> + Used as background of this [ScrollBar]. </theme_item> <theme_item name="scroll_focus" type="StyleBox"> + Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> </class> diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml index c34364c573..aa83b67934 100644 --- a/doc/classes/HSeparator.xml +++ b/doc/classes/HSeparator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HSeparator" inherits="Separator" category="Core" version="3.2"> +<class name="HSeparator" inherits="Separator" version="4.0"> <brief_description> Horizontal separator. </brief_description> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 2fef4669d2..2999580e83 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HSlider" inherits="Slider" category="Core" version="3.2"> +<class name="HSlider" inherits="Slider" version="4.0"> <brief_description> Horizontal slider. </brief_description> @@ -13,20 +13,14 @@ <constants> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> - </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> <theme_item name="grabber_disabled" type="Texture"> </theme_item> - <theme_item name="grabber_disabled" type="StyleBox"> - </theme_item> <theme_item name="grabber_highlight" type="Texture"> </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> - </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> <theme_item name="tick" type="Texture"> diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index 3a425705c6..6191087c2e 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HSplitContainer" inherits="SplitContainer" category="Core" version="3.2"> +<class name="HSplitContainer" inherits="SplitContainer" version="4.0"> <brief_description> Horizontal split container. </brief_description> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 52e4b94051..bdcbb11ef0 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HTTPClient" inherits="Reference" category="Core" version="3.2"> +<class name="HTTPClient" inherits="Reference" version="4.0"> <brief_description> Hyper-text transfer protocol client. </brief_description> @@ -79,7 +79,7 @@ <return type="int" enum="HTTPClient.Status"> </return> <description> - Returns a [code]STATUS_*[/code] enum constant. Need to call [method poll] in order to get status updates. + Returns a [enum Status] constant. Need to call [method poll] in order to get status updates. </description> </method> <method name="has_response" qualifiers="const"> @@ -100,7 +100,7 @@ <return type="int" enum="Error"> </return> <description> - This needs to be called in order to have any request processed. Check results with [method get_status] + This needs to be called in order to have any request processed. Check results with [method get_status]. </description> </method> <method name="query_string_from_dict"> @@ -112,13 +112,13 @@ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: [codeblock] var fields = {"username": "user", "password": "pass"} - String query_string = http_client.query_string_from_dict(fields) + var query_string = http_client.query_string_from_dict(fields) # Returns "username=user&password=pass" [/codeblock] Furthermore, if a key has a [code]null[/code] value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. [codeblock] var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]} - String query_string = http_client.query_string_from_dict(fields) + var query_string = http_client.query_string_from_dict(fields) # Returns "single=123&not_valued&multiple=22&multiple=33&multiple=44" [/codeblock] </description> @@ -143,7 +143,7 @@ </argument> <description> Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. - Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code]. + Headers are HTTP request headers. For available HTTP methods, see [enum Method]. To create a POST request with query strings to push to the server, do: [codeblock] var fields = {"username" : "user", "password" : "pass"} @@ -166,19 +166,10 @@ </argument> <description> Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. - Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code]. + Headers are HTTP request headers. For available HTTP methods, see [enum Method]. Sends the body data raw, as a byte array and does not encode it in any way. </description> </method> - <method name="set_read_chunk_size"> - <return type="void"> - </return> - <argument index="0" name="bytes" type="int"> - </argument> - <description> - Sets the size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk]. - </description> - </method> </methods> <members> <member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false"> @@ -187,6 +178,9 @@ <member name="connection" type="StreamPeer" setter="set_connection" getter="get_connection"> The connection to use for this client. </member> + <member name="read_chunk_size" type="int" setter="set_read_chunk_size" getter="get_read_chunk_size" default="4096"> + The size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk]. + </member> </members> <constants> <constant name="METHOD_GET" value="0" enum="Method"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index d0e8a5972f..313f21d8f9 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -1,11 +1,32 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HTTPRequest" inherits="Node" category="Core" version="3.2"> +<class name="HTTPRequest" inherits="Node" version="4.0"> <brief_description> A node with the ability to send HTTP(S) requests. </brief_description> <description> A node with the ability to send HTTP requests. Uses [HTTPClient] internally. Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. + [b]Example of contacting a REST API and printing one of its returned fields:[/b] + [codeblock] + func _ready(): + # Create an HTTP request node and connect its completion signal. + var http_request = HTTPRequest.new() + add_child(http_request) + http_request.connect("request_completed", self, "_http_request_completed") + + # Perform the HTTP request. The URL below returns some JSON as of writing. + var error = http_request.request("https://httpbin.org/get") + if error != OK: + push_error("An error occurred in the HTTP request.") + + + # Called when the HTTP request is completed. + func _http_request_completed(result, response_code, headers, body): + var response = parse_json(body.get_string_from_utf8()) + + # Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org). + print(response.headers["User-Agent"]) + [/codeblock] [b]Example of loading and displaying an image using HTTPRequest:[/b] [codeblock] func _ready(): @@ -67,7 +88,7 @@ <return type="int" enum="HTTPClient.Status"> </return> <description> - Returns the current status of the underlying [HTTPClient]. See [code]STATUS_*[/code] enum on [HTTPClient]. + Returns the current status of the underlying [HTTPClient]. See [enum HTTPClient.Status]. </description> </method> <method name="request"> @@ -93,6 +114,10 @@ <member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1"> Maximum allowed size for response bodies. </member> + <member name="download_chunk_size" type="int" setter="set_download_chunk_size" getter="get_download_chunk_size" default="4096"> + The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size]. + Set this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory. + </member> <member name="download_file" type="String" setter="set_download_file" getter="get_download_file" default=""""> The file to download into. Will output any received file into it. </member> @@ -145,7 +170,7 @@ Request exceeded its maximum size limit, see [member body_size_limit]. </constant> <constant name="RESULT_REQUEST_FAILED" value="8" enum="Result"> - Request failed. (Unused) + Request failed (currently unused). </constant> <constant name="RESULT_DOWNLOAD_FILE_CANT_OPEN" value="9" enum="Result"> HTTPRequest couldn't open the download file. diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index 802b186ef3..bc585df4a0 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HashingContext" inherits="Reference" category="Core" version="3.2"> +<class name="HashingContext" inherits="Reference" version="4.0"> <brief_description> Context to compute cryptographic hashes over multiple iterations. </brief_description> @@ -27,6 +27,7 @@ # Print the result as hex string and array. printt(res.hex_encode(), Array(res)) [/codeblock] + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape.xml index cb7da8af26..f94089066c 100644 --- a/doc/classes/HeightMapShape.xml +++ b/doc/classes/HeightMapShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HeightMapShape" inherits="Shape" category="Core" version="3.2"> +<class name="HeightMapShape" inherits="Shape" version="4.0"> <brief_description> Height map shape for 3D physics (Bullet only). </brief_description> diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml index 4582e36da6..53fa74cace 100644 --- a/doc/classes/HingeJoint.xml +++ b/doc/classes/HingeJoint.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="HingeJoint" inherits="Joint" category="Core" version="3.2"> +<class name="HingeJoint" inherits="Joint" version="4.0"> <brief_description> A hinge between two 3D bodies. </brief_description> diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index b8b5f0bd39..152f381a83 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="IP" inherits="Object" category="Core" version="3.2"> +<class name="IP" inherits="Object" version="4.0"> <brief_description> Internet protocol (IP) support functions such as DNS resolution. </brief_description> @@ -65,7 +65,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns a queued hostname's status as a [code]RESOLVER_STATUS_*[/code] constant, given its queue [code]id[/code]. + Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code]. </description> </method> <method name="resolve_hostname"> @@ -76,7 +76,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. + Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code]. </description> </method> <method name="resolve_hostname_queue_item"> @@ -87,7 +87,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. + Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. </description> </method> </methods> diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml index 2a97c40ef8..79cdf2ce08 100644 --- a/doc/classes/IP_Unix.xml +++ b/doc/classes/IP_Unix.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="IP_Unix" inherits="IP" category="Core" version="3.2"> +<class name="IP_Unix" inherits="IP" version="4.0"> <brief_description> UNIX IP support. See [IP]. </brief_description> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index c6d63035d1..2cd17cb5c5 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Image" inherits="Resource" category="Core" version="3.2"> +<class name="Image" inherits="Resource" version="4.0"> <brief_description> Image datatype. </brief_description> @@ -71,6 +71,7 @@ <argument index="0" name="bump_scale" type="float" default="1.0"> </argument> <description> + Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel. </description> </method> <method name="clear_mipmaps"> @@ -90,7 +91,7 @@ <argument index="2" name="lossy_quality" type="float"> </argument> <description> - Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [code]COMPRESS_*[/code] constants. + Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants. </description> </method> <method name="convert"> @@ -99,7 +100,7 @@ <argument index="0" name="format" type="int" enum="Image.Format"> </argument> <description> - Converts the image's format. See [code]FORMAT_*[/code] constants. + Converts the image's format. See [enum Format] constants. </description> </method> <method name="copy_from"> @@ -123,7 +124,7 @@ <argument index="3" name="format" type="int" enum="Image.Format"> </argument> <description> - Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="create_from_data"> @@ -140,7 +141,7 @@ <argument index="4" name="data" type="PoolByteArray"> </argument> <description> - Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="crop"> @@ -165,7 +166,7 @@ <return type="int" enum="Image.AlphaMode"> </return> <description> - Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found. + Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> <method name="expand_x2_hq2x"> @@ -225,7 +226,7 @@ <return type="int" enum="Image.Format"> </return> <description> - Returns the image's format. See [code]FORMAT_*[/code] constants. + Returns the image's format. See [enum Format] constants. </description> </method> <method name="get_height" qualifiers="const"> @@ -284,7 +285,7 @@ <return type="Rect2"> </return> <description> - Returns a [Rect2] enclosing the visible portion of the image. + Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. </description> </method> <method name="get_width" qualifiers="const"> @@ -405,6 +406,7 @@ <return type="Image"> </return> <description> + Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. </description> </method> <method name="save_exr" qualifiers="const"> @@ -491,7 +493,7 @@ </methods> <members> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PoolByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> - Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants. + Holds all of the image's color data in a given format. See [enum Format] constants. </member> </members> <constants> @@ -502,8 +504,10 @@ The maximal height allowed for [Image] resources. </constant> <constant name="FORMAT_L8" value="0" enum="Format"> + Texture format with a single 8-bit depth representing luminance. </constant> <constant name="FORMAT_LA8" value="1" enum="Format"> + OpenGL texture format with two values, luminance and alpha each stored with 8 bits. </constant> <constant name="FORMAT_R8" value="2" enum="Format"> OpenGL texture format [code]RED[/code] with a single component and a bitdepth of 8. @@ -643,26 +647,37 @@ Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. </constant> <constant name="ALPHA_NONE" value="0" enum="AlphaMode"> + Image does not have alpha. </constant> <constant name="ALPHA_BIT" value="1" enum="AlphaMode"> + Image stores alpha in a single bit. </constant> <constant name="ALPHA_BLEND" value="2" enum="AlphaMode"> + Image uses alpha. </constant> <constant name="COMPRESS_S3TC" value="0" enum="CompressMode"> + Use S3TC compression. </constant> <constant name="COMPRESS_PVRTC2" value="1" enum="CompressMode"> + Use PVRTC2 compression. </constant> <constant name="COMPRESS_PVRTC4" value="2" enum="CompressMode"> + Use PVRTC4 compression. </constant> <constant name="COMPRESS_ETC" value="3" enum="CompressMode"> + Use ETC compression. </constant> <constant name="COMPRESS_ETC2" value="4" enum="CompressMode"> + Use ETC2 compression. </constant> <constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource"> + Source texture (before compression) is a regular texture. Default for all textures. </constant> <constant name="COMPRESS_SOURCE_SRGB" value="1" enum="CompressSource"> + Source texture (before compression) is in sRGB space. </constant> <constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource"> + Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). </constant> </constants> </class> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 03bf739760..7e3e818773 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ImageTexture" inherits="Texture" category="Core" version="3.2"> +<class name="ImageTexture" inherits="Texture" version="4.0"> <brief_description> A [Texture] based on an [Image]. </brief_description> diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index ddfd3d74d5..bb58192313 100644 --- a/doc/classes/ImmediateGeometry.xml +++ b/doc/classes/ImmediateGeometry.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.2"> +<class name="ImmediateGeometry" inherits="GeometryInstance" version="4.0"> <brief_description> Draws simple geometry from code. </brief_description> @@ -30,7 +30,7 @@ <argument index="0" name="position" type="Vector3"> </argument> <description> - Adds a vertex with the currently set color/uv/etc. + Adds a vertex in local coordinate space with the currently set color/uv/etc. </description> </method> <method name="begin"> @@ -41,8 +41,8 @@ <argument index="1" name="texture" type="Texture" default="null"> </argument> <description> - Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. - For the type of primitive, use the [Mesh].[code]PRIMITIVE_*[/code] enumerations. + Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references. + For the type of primitive, see the [enum Mesh.PrimitiveType] enum. </description> </method> <method name="clear"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 6d4adfad51..b7afe57218 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Input" inherits="Object" category="Core" version="3.2"> +<class name="Input" inherits="Object" version="4.0"> <brief_description> - A Singleton that deals with inputs. + A singleton that deals with inputs. </brief_description> <description> - A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b], or with the [InputMap] class. + A singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b], or with the [InputMap] class. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link> @@ -277,6 +277,8 @@ <argument index="3" name="guid" type="String"> </argument> <description> + Notifies the [Input] singleton that a connection has changed, to update the state for the [code]device[/code] index. + This is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally. </description> </method> <method name="parse_input_event"> @@ -314,7 +316,7 @@ <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> - Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See enum [code]CURSOR_*[/code] for the list of shapes. + Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. [code]image[/code]'s size must be lower than 256×256. [code]hotspot[/code] must be within [code]image[/code]'s size. [b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. diff --git a/doc/classes/InputDefault.xml b/doc/classes/InputDefault.xml index e96b885d10..ea4d08c628 100644 --- a/doc/classes/InputDefault.xml +++ b/doc/classes/InputDefault.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputDefault" inherits="Input" category="Core" version="3.2"> +<class name="InputDefault" inherits="Input" version="4.0"> <brief_description> Default implementation of the [Input] class. </brief_description> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index d412ce09e2..9e3764206b 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEvent" inherits="Resource" category="Core" version="3.2"> +<class name="InputEvent" inherits="Resource" version="4.0"> <brief_description> - Generic input event + Generic input event. </brief_description> <description> Base class of all sort of input event. See [method Node._input]. @@ -111,6 +111,7 @@ <members> <member name="device" type="int" setter="set_device" getter="get_device" default="0"> The event's device ID. + [b]Note:[/b] This device ID will always be [code]-1[/code] for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input. </member> </members> <constants> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 46c47e357f..2dac693a52 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventAction" inherits="InputEvent" category="Core" version="3.2"> +<class name="InputEventAction" inherits="InputEvent" version="4.0"> <brief_description> Input event type for actions. </brief_description> diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml index 59750a0902..9cacd3e6fd 100644 --- a/doc/classes/InputEventGesture.xml +++ b/doc/classes/InputEventGesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventGesture" inherits="InputEventWithModifiers" category="Core" version="3.2"> +<class name="InputEventGesture" inherits="InputEventWithModifiers" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index dcdda83681..19aa97e1ec 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventJoypadButton" inherits="InputEvent" category="Core" version="3.2"> +<class name="InputEventJoypadButton" inherits="InputEvent" version="4.0"> <brief_description> Input event for gamepad buttons. </brief_description> diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index eb05cd2f99..01e02b79b1 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.2"> +<class name="InputEventJoypadMotion" inherits="InputEvent" version="4.0"> <brief_description> Input event type for gamepad joysticks and other motions. For buttons, see [code]InputEventJoypadButton[/code]. </brief_description> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index cf9faaa26d..637f697f01 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventKey" inherits="InputEventWithModifiers" category="Core" version="3.2"> +<class name="InputEventKey" inherits="InputEventWithModifiers" version="4.0"> <brief_description> Input event type for keyboard events. </brief_description> @@ -15,6 +15,7 @@ </return> <description> Returns the scancode combined with modifier keys such as [code]Shift[/code] or [code]Alt[/code]. See also [InputEventWithModifiers]. + To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_scancode_string(event.get_scancode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. </description> </method> </methods> @@ -26,10 +27,11 @@ If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released. </member> <member name="scancode" type="int" setter="set_scancode" getter="get_scancode" default="0"> - Key scancode, one of the [enum KeyList] constants. + The key scancode, which corresponds to one of the [enum KeyList] constants. + To get a human-readable representation of the [InputEventKey], use [code]OS.get_scancode_string(event.scancode)[/code] where [code]event[/code] is the [InputEventKey]. </member> <member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0"> - Key Unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. + The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. </member> </members> <constants> diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml index fe77e46c6c..13bb9d8b85 100644 --- a/doc/classes/InputEventMIDI.xml +++ b/doc/classes/InputEventMIDI.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventMIDI" inherits="InputEvent" category="Core" version="3.2"> +<class name="InputEventMIDI" inherits="InputEvent" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml index f5add435f5..3e539b2f97 100644 --- a/doc/classes/InputEventMagnifyGesture.xml +++ b/doc/classes/InputEventMagnifyGesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventMagnifyGesture" inherits="InputEventGesture" category="Core" version="3.2"> +<class name="InputEventMagnifyGesture" inherits="InputEventGesture" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 56ba33702b..e3c9d688d2 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventMouse" inherits="InputEventWithModifiers" category="Core" version="3.2"> +<class name="InputEventMouse" inherits="InputEventWithModifiers" version="4.0"> <brief_description> Base input event type for mouse events. </brief_description> diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index 4cf7174ab1..b83588a877 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventMouseButton" inherits="InputEventMouse" category="Core" version="3.2"> +<class name="InputEventMouseButton" inherits="InputEventMouse" version="4.0"> <brief_description> Input event type for mouse button events. </brief_description> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 5cd6a0c285..1549353d45 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventMouseMotion" inherits="InputEventMouse" category="Core" version="3.2"> +<class name="InputEventMouseMotion" inherits="InputEventMouse" version="4.0"> <brief_description> Input event type for mouse motion events. </brief_description> diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml index dab2c74543..83161cd163 100644 --- a/doc/classes/InputEventPanGesture.xml +++ b/doc/classes/InputEventPanGesture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventPanGesture" inherits="InputEventGesture" category="Core" version="3.2"> +<class name="InputEventPanGesture" inherits="InputEventGesture" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index be2eafbe7c..d7e0c2454c 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.2"> +<class name="InputEventScreenDrag" inherits="InputEvent" version="4.0"> <brief_description> Input event type for screen drag events. Only available on mobile devices. </brief_description> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 6239fbc949..4a5cd36423 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventScreenTouch" inherits="InputEvent" category="Core" version="3.2"> +<class name="InputEventScreenTouch" inherits="InputEvent" version="4.0"> <brief_description> Input event type for screen touch events. (only available on mobile devices) diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index 9b31dd4639..63465ad28c 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputEventWithModifiers" inherits="InputEvent" category="Core" version="3.2"> +<class name="InputEventWithModifiers" inherits="InputEvent" version="4.0"> <brief_description> Base class for keys events with modifiers. </brief_description> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 6bbb402b15..aa3400dd97 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InputMap" inherits="Object" category="Core" version="3.2"> +<class name="InputMap" inherits="Object" version="4.0"> <brief_description> Singleton that manages [InputEventAction]. </brief_description> @@ -60,6 +60,7 @@ <argument index="1" name="deadzone" type="float"> </argument> <description> + Sets a deadzone value for the action. </description> </method> <method name="add_action"> diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index 4b98166ef2..c1d920c2c1 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InstancePlaceholder" inherits="Node" category="Core" version="3.2"> +<class name="InstancePlaceholder" inherits="Node" version="4.0"> <brief_description> Placeholder for the root [Node] of a [PackedScene]. </brief_description> diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml index ca3a5d0733..66df7e9531 100644 --- a/doc/classes/InterpolatedCamera.xml +++ b/doc/classes/InterpolatedCamera.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="InterpolatedCamera" inherits="Camera" category="Core" version="3.2"> +<class name="InterpolatedCamera" inherits="Camera" version="4.0"> <brief_description> Camera which moves toward another node. </brief_description> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index c82d6a27c0..5c4a956c08 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ItemList" inherits="Control" category="Core" version="3.2"> +<class name="ItemList" inherits="Control" version="4.0"> <brief_description> Control that provides a list of selectable items (and/or icons) in a single column, or optionally in multiple columns. </brief_description> <description> This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing Enter. + Item text only supports single-line strings, newline characters (e.g. [code]\n[/code]) in the string won't produce a newline. Text wrapping is enabled in [constant ICON_MODE_TOP] mode, but column's width is adjusted to fully fit its content by default. You need to set [member fixed_column_width] greater than zero to wrap the text. </description> <tutorials> </tutorials> @@ -57,7 +58,8 @@ <argument index="1" name="exact" type="bool" default="false"> </argument> <description> - Given a position within the control return the item (if any) at that point. + Returns the item index at the given [code]position[/code]. + When there is no item at that point, -1 will be returned if [code]exact[/code] is [code]true[/code], and the closest item index will be returned otherwise. </description> </method> <method name="get_item_count" qualifiers="const"> @@ -109,6 +111,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the region of item's icon used. The whole icon will be used if the region has no area. </description> </method> <method name="get_item_metadata" qualifiers="const"> @@ -174,6 +177,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the item icon will be drawn transposed, i.e. the X and Y axes are swapped. </description> </method> <method name="is_item_selectable" qualifiers="const"> @@ -307,6 +311,7 @@ <argument index="1" name="rect" type="Rect2"> </argument> <description> + Sets the region of item's icon used. The whole icon will be used if the region has no area. </description> </method> <method name="set_item_icon_transposed"> @@ -314,9 +319,10 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="rect" type="bool"> + <argument index="1" name="transposed" type="bool"> </argument> <description> + Sets whether the item icon will be drawn transposed. </description> </method> <method name="set_item_metadata"> @@ -409,26 +415,33 @@ If [code]true[/code], the control will automatically resize the height to fit its content. </member> <member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width" default="0"> - Sets the default column width in pixels. If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. + The width all columns will be adjusted to. + A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width. </member> <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2( 0, 0 )"> - Sets the default icon size in pixels. + The size all icons will be adjusted to. + If either X or Y component is not greater than zero, icon size won't be affected. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode" default="1"> - Sets the default position of the icon to either [constant ICON_MODE_LEFT] or [constant ICON_MODE_TOP]. + The icon position, whether above or to the left of the text. See the [enum IconMode] constants. </member> <member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale" default="1.0"> - Sets the icon size to its initial size multiplied by the specified scale. + The scale of icon applied after [member fixed_icon_size] and transposing takes effect. </member> <member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns" default="1"> - Sets the maximum columns the list will have. If set to anything other than the default, the content will be split among the specified columns. + Maximum columns the list will have. + If greater than zero, the content will be split among the specified columns. + A value of zero means unlimited columns, i.e. all items will be put in the same row. </member> <member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines" default="1"> + Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display. + [b]Note:[/b] This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width" default="false"> - If set to [code]true[/code], all columns will have the same width specified by [member fixed_column_width]. + Whether all columns will have the same width. + If [code]true[/code], the width is equal to the largest column width of all columns. </member> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0"> Allows single or multiple item selection. See the [enum SelectMode] constants. @@ -486,8 +499,10 @@ </signals> <constants> <constant name="ICON_MODE_TOP" value="0" enum="IconMode"> + Icon is drawn above the text. </constant> <constant name="ICON_MODE_LEFT" value="1" enum="IconMode"> + Icon is drawn to the left of the text. </constant> <constant name="SELECT_SINGLE" value="0" enum="SelectMode"> Only allow selecting a single item. @@ -498,32 +513,46 @@ </constants> <theme_items> <theme_item name="bg" type="StyleBox"> + Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused. </theme_item> <theme_item name="bg_focus" type="StyleBox"> + [StyleBox] used when the [ItemList] is being focused. </theme_item> <theme_item name="cursor" type="StyleBox"> + [StyleBox] used for the cursor, when the [ItemList] is being focused. </theme_item> <theme_item name="cursor_unfocused" type="StyleBox"> + [StyleBox] used for the cursor, when the [ItemList] is not being focused. </theme_item> <theme_item name="font" type="Font"> + [Font] of the item's text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )"> + Default text [Color] of the item. </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the item is selected. </theme_item> <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )"> + [Color] of the guideline. The guideline is a line drawn between each row of items. </theme_item> <theme_item name="hseparation" type="int" default="4"> + The horizontal spacing between items. </theme_item> <theme_item name="icon_margin" type="int" default="4"> + The spacing between item's icon and text. </theme_item> <theme_item name="line_separation" type="int" default="2"> + The vertical spacing between each line of text. </theme_item> <theme_item name="selected" type="StyleBox"> + [StyleBox] for the selected items, used when the [ItemList] is not being focused. </theme_item> <theme_item name="selected_focus" type="StyleBox"> + [StyleBox] for the selected items, used when the [ItemList] is being focused. </theme_item> <theme_item name="vseparation" type="int" default="2"> + The vertical spacing between items. </theme_item> </theme_items> </class> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index e834f5cb39..7bd2edcb1c 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="JSON" inherits="Object" category="Core" version="3.2"> +<class name="JSON" inherits="Object" version="4.0"> <brief_description> Helper class for parsing JSON data. </brief_description> diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml index 98db123f5b..4444e08593 100644 --- a/doc/classes/JSONParseResult.xml +++ b/doc/classes/JSONParseResult.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="JSONParseResult" inherits="Reference" category="Core" version="3.2"> +<class name="JSONParseResult" inherits="Reference" version="4.0"> <brief_description> Data class wrapper for decoded JSON. </brief_description> @@ -12,13 +12,13 @@ </methods> <members> <member name="error" type="int" setter="set_error" getter="get_error" enum="Error"> - The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. + The error type if the JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1"> The line number where the error occurred if JSON source was not successfully parsed. </member> <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default=""""> - The error message if JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. + The error message if JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="result" type="Variant" setter="set_result" getter="get_result"> A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with braces ([code][][/code]), an [Array] will be returned. diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml index 10d9e5943e..1e74159f58 100644 --- a/doc/classes/JSONRPC.xml +++ b/doc/classes/JSONRPC.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="JSONRPC" inherits="Object" category="Core" version="3.2"> +<class name="JSONRPC" inherits="Object" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/JavaClass.xml b/doc/classes/JavaClass.xml new file mode 100644 index 0000000000..69b7a9b718 --- /dev/null +++ b/doc/classes/JavaClass.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JavaClass" inherits="Reference" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml new file mode 100644 index 0000000000..7bad336af9 --- /dev/null +++ b/doc/classes/JavaClassWrapper.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="JavaClassWrapper" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="wrap"> + <return type="JavaClass"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index 7737001a6c..68f6c32a53 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="JavaScript" inherits="Object" category="Core" version="3.2"> +<class name="JavaScript" inherits="Object" version="4.0"> <brief_description> Singleton that connects the engine with the browser's JavaScript context in HTML5 export. </brief_description> diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml index fe50cdac10..34da997292 100644 --- a/doc/classes/Joint.xml +++ b/doc/classes/Joint.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Joint" inherits="Spatial" category="Core" version="3.2"> +<class name="Joint" inherits="Spatial" version="4.0"> <brief_description> Base class for all 3D joints. </brief_description> diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml index 63d083d470..fb0e184c26 100644 --- a/doc/classes/Joint2D.xml +++ b/doc/classes/Joint2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Joint2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Joint2D" inherits="Node2D" version="4.0"> <brief_description> Base node for all joint constraints in 2D physics. </brief_description> diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 2fab689f89..2cf49f417c 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="KinematicBody" inherits="PhysicsBody" category="Core" version="3.2"> +<class name="KinematicBody" inherits="PhysicsBody" version="4.0"> <brief_description> Kinematic body 3D node. </brief_description> @@ -18,13 +18,21 @@ <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis"> </argument> <description> + Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. + </description> + </method> + <method name="get_floor_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_floor_velocity" qualifiers="const"> <return type="Vector3"> </return> <description> - Returns the velocity of the floor. Only updates when calling [method move_and_slide]. + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_slide_collision"> @@ -85,7 +93,7 @@ </return> <argument index="0" name="linear_velocity" type="Vector3"> </argument> - <argument index="1" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="1" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <argument index="2" name="stop_on_slope" type="bool" default="false"> </argument> @@ -98,7 +106,7 @@ <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. + [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code]. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. @@ -113,7 +121,7 @@ </argument> <argument index="1" name="snap" type="Vector3"> </argument> - <argument index="2" name="floor_normal" type="Vector3" default="Vector3( 0, 0, 0 )"> + <argument index="2" name="up_direction" type="Vector3" default="Vector3( 0, 0, 0 )"> </argument> <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> @@ -125,7 +133,7 @@ </argument> <description> Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting[code]snap[/code] to[code](0, 0, 0)[/code] or by using [method move_and_slide] instead. + As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead. </description> </method> <method name="set_axis_lock"> @@ -136,6 +144,7 @@ <argument index="1" name="lock" type="bool"> </argument> <description> + Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. </description> </method> <method name="test_move"> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 99a83765eb..58d7b1f831 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="KinematicBody2D" inherits="PhysicsBody2D" category="Core" version="3.2"> +<class name="KinematicBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> Kinematic body 2D node. </brief_description> @@ -13,11 +13,18 @@ <link>https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_body_2d.html</link> </tutorials> <methods> + <method name="get_floor_normal" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> <method name="get_floor_velocity" qualifiers="const"> <return type="Vector2"> </return> <description> - Returns the velocity of the floor. Only updates when calling [method move_and_slide]. + Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] or [method move_and_slide_with_snap] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_slide_collision"> @@ -84,7 +91,7 @@ </return> <argument index="0" name="linear_velocity" type="Vector2"> </argument> - <argument index="1" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="1" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> </argument> <argument index="2" name="stop_on_slope" type="bool" default="false"> </argument> @@ -97,7 +104,7 @@ <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. - [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. + [code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. @@ -112,7 +119,7 @@ </argument> <argument index="1" name="snap" type="Vector2"> </argument> - <argument index="2" name="floor_normal" type="Vector2" default="Vector2( 0, 0 )"> + <argument index="2" name="up_direction" type="Vector2" default="Vector2( 0, 0 )"> </argument> <argument index="3" name="stop_on_slope" type="bool" default="false"> </argument> diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml index 44447c8fc8..858a1e69c0 100644 --- a/doc/classes/KinematicCollision.xml +++ b/doc/classes/KinematicCollision.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="KinematicCollision" inherits="Reference" category="Core" version="3.2"> +<class name="KinematicCollision" inherits="Reference" version="4.0"> <brief_description> Collision data for [KinematicBody] collisions. </brief_description> @@ -16,7 +16,7 @@ The colliding body. </member> <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> - The colliding body's unique [RID]. + The colliding body's unique instance ID. See [method Object.get_instance_id]. </member> <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. @@ -37,7 +37,7 @@ The colliding body's shape's normal at the point of collision. </member> <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3( 0, 0, 0 )"> - The point of collision. + The point of collision, in global coordinates. </member> <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3( 0, 0, 0 )"> The moving object's remaining movement vector. diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index 51c2277fb2..ec6e16e25a 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.2"> +<class name="KinematicCollision2D" inherits="Reference" version="4.0"> <brief_description> Collision data for [KinematicBody2D] collisions. </brief_description> @@ -16,7 +16,7 @@ The colliding body. </member> <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> - The colliding body's unique [RID]. + The colliding body's unique instance ID. See [method Object.get_instance_id]. </member> <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. @@ -37,7 +37,7 @@ The colliding body's shape's normal at the point of collision. </member> <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2( 0, 0 )"> - The point of collision. + The point of collision, in global coordinates. </member> <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2( 0, 0 )"> The moving object's remaining movement vector. diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 4d1584e9de..263fb6c022 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Label" inherits="Control" category="Core" version="3.2"> +<class name="Label" inherits="Control" version="4.0"> <brief_description> Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel]. </brief_description> @@ -41,7 +41,7 @@ </methods> <members> <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0"> - Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants. + Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum Align] constants. </member> <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. @@ -67,7 +67,7 @@ If [code]true[/code], all the text displays as UPPERCASE. </member> <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign" default="0"> - Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. + Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum VAlign] constants. </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> Restricts the number of characters to display. Set to -1 to disable. @@ -101,22 +101,31 @@ </constants> <theme_items> <theme_item name="font" type="Font"> + [Font] used for the [Label]'s text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Default text [Color] of the [Label]. </theme_item> <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )"> + [Color] of the text's shadow effect. </theme_item> <theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of [Font]'s outline. See [member DynamicFont.outline_color]. </theme_item> <theme_item name="line_spacing" type="int" default="3"> + Vertical space between lines in multiline [Label]. </theme_item> <theme_item name="normal" type="StyleBox"> + Background [StyleBox] for the [Label]. </theme_item> <theme_item name="shadow_as_outline" type="int" default="0"> + Boolean value. If set to 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline. </theme_item> <theme_item name="shadow_offset_x" type="int" default="1"> + The horizontal offset of the text's shadow. </theme_item> <theme_item name="shadow_offset_y" type="int" default="1"> + The vertical offset of the text's shadow. </theme_item> </theme_items> </class> diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml index 4dbda34a46..ab39462870 100644 --- a/doc/classes/LargeTexture.xml +++ b/doc/classes/LargeTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LargeTexture" inherits="Texture" category="Core" version="3.2"> +<class name="LargeTexture" inherits="Texture" version="4.0"> <brief_description> A [Texture] capable of storing many smaller textures with offsets. </brief_description> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index 6ef7c2652d..763f3b4b41 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Light" inherits="VisualInstance" category="Core" version="3.2"> +<class name="Light" inherits="VisualInstance" version="4.0"> <brief_description> Provides a base class for different kinds of light nodes. </brief_description> @@ -16,6 +16,7 @@ <argument index="0" name="param" type="int" enum="Light.Param"> </argument> <description> + Returns the value of the specified [enum Light.Param] parameter. </description> </method> <method name="set_param"> @@ -26,6 +27,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the value of the specified [enum Light.Param] parameter. </description> </method> </methods> @@ -67,38 +69,54 @@ If [code]true[/code], the light will cast shadows. </member> <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false"> + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED]. </member> </members> <constants> <constant name="PARAM_ENERGY" value="0" enum="Param"> + Constant for accessing [member light_energy]. </constant> <constant name="PARAM_INDIRECT_ENERGY" value="1" enum="Param"> + Constant for accessing [member light_indirect_energy]. </constant> <constant name="PARAM_SPECULAR" value="2" enum="Param"> + Constant for accessing [member light_specular]. </constant> <constant name="PARAM_RANGE" value="3" enum="Param"> + Constant for accessing [member OmniLight.omni_range] or [member SpotLight.spot_range]. </constant> <constant name="PARAM_ATTENUATION" value="4" enum="Param"> + Constant for accessing [member OmniLight.omni_attenuation] or [member SpotLight.spot_attenuation]. </constant> <constant name="PARAM_SPOT_ANGLE" value="5" enum="Param"> + Constant for accessing [member SpotLight.spot_angle]. </constant> <constant name="PARAM_SPOT_ATTENUATION" value="6" enum="Param"> + Constant for accessing [member SpotLight.spot_angle_attenuation]. </constant> <constant name="PARAM_CONTACT_SHADOW_SIZE" value="7" enum="Param"> + Constant for accessing [member shadow_contact]. </constant> <constant name="PARAM_SHADOW_MAX_DISTANCE" value="8" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_max_distance]. </constant> <constant name="PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_1]. </constant> <constant name="PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_2]. </constant> <constant name="PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_split_3]. </constant> <constant name="PARAM_SHADOW_NORMAL_BIAS" value="12" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_normal_bias]. </constant> <constant name="PARAM_SHADOW_BIAS" value="13" enum="Param"> + Constant for accessing [member shadow_bias]. </constant> <constant name="PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="Param"> + Constant for accessing [member DirectionalLight.directional_shadow_bias_split_scale]. </constant> <constant name="PARAM_MAX" value="15" enum="Param"> Represents the size of the [enum Param] enum. diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index f61be5a5af..5f3ad1b865 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Light2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Light2D" inherits="Node2D" version="4.0"> <brief_description> Casts light in a 2D environment. </brief_description> @@ -8,7 +8,7 @@ [b]Note:[/b] Light2D can also be used as a mask. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> </tutorials> <methods> </methods> @@ -26,7 +26,7 @@ The Light2D's energy value. The larger the value, the stronger the light. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode" default="0"> - The Light2D's mode. See [code]MODE_*[/code] constants for values. + The Light2D's mode. See [enum Mode] constants for values. </member> <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> The offset of the Light2D's [code]texture[/code]. @@ -68,7 +68,7 @@ Smooth shadow gradient length. </member> <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask" default="1"> - The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows. + The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> [Texture] used for the Light2D's appearance. diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml index c7d52e6ef4..a02f7a0f75 100644 --- a/doc/classes/LightOccluder2D.xml +++ b/doc/classes/LightOccluder2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.2"> +<class name="LightOccluder2D" inherits="Node2D" version="4.0"> <brief_description> Occludes light cast by a Light2D, casting shadows. </brief_description> @@ -7,7 +7,7 @@ Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 3cb04b8b89..b5983e00b9 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Line2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Line2D" inherits="Node2D" version="4.0"> <brief_description> A 2D line. </brief_description> <description> A line through several points in 2D space. + [b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase [member ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and [member ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb]. </description> <tutorials> </tutorials> @@ -66,14 +67,17 @@ </method> </methods> <members> + <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false"> + If [code]true[/code], the line's border will be anti-aliased. + </member> <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0"> - Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. + Controls the style of the line's first point. Use [enum LineCapMode] constants. </member> <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 0.4, 0.5, 1, 1 )"> The line's color. Will not be used if a gradient is set. </member> <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0"> - Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. + Controls the style of the line's last point. Use [enum LineCapMode] constants. </member> <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. @@ -94,7 +98,7 @@ The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. </member> <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0"> - The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. + The style to render the [code]texture[/code] on the line. Use [enum LineTextureMode] constants. </member> <member name="width" type="float" setter="set_width" getter="get_width" default="10.0"> The line's width. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index de216563d3..f2574360cb 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LineEdit" inherits="Control" category="Core" version="3.2"> +<class name="LineEdit" inherits="Control" version="4.0"> <brief_description> Control that provides single-line string editing. </brief_description> <description> - LineEdit provides a single-line string editor, used for text fields. It features many built-in shortcuts which will always be available: + LineEdit provides a single-line string editor, used for text fields. + It features many built-in shortcuts which will always be available ([code]Ctrl[/code] here maps to [code]Command[/code] on macOS): - Ctrl + C: Copy - Ctrl + X: Cut - Ctrl + V or Ctrl + Y: Paste/"yank" @@ -14,6 +15,17 @@ - Ctrl + K: Delete text from the cursor position to the end of the line - Ctrl + A: Select all text - Up/Down arrow: Move the cursor to the beginning/end of the line + On macOS, some extra keyboard shortcuts are available: + - Ctrl + F: Like the right arrow key, move the cursor one character right + - Ctrl + B: Like the left arrow key, move the cursor one character left + - Ctrl + P: Like the up arrow key, move the cursor to the previous line + - Ctrl + N: Like the down arrow key, move the cursor to the next line + - Ctrl + D: Like the Delete key, delete the character on the right side of cursor + - Ctrl + H: Like the Backspace key, delete the character on the left side of the cursor + - Ctrl + A: Like the Home key, move the cursor to the beginning of the line + - Ctrl + E: Like the End key, move the cursor to the end of the line + - Command + Left arrow: Like the Home key, move the cursor to the beginning of the line + - Command + Right arrow: Like the End key, move the cursor to the end of the line </description> <tutorials> </tutorials> @@ -54,7 +66,7 @@ <argument index="0" name="option" type="int"> </argument> <description> - Executes a given action as defined in the[code]MENU_*[/code] enum. + Executes a given action as defined in the [enum MenuItems] enum. </description> </method> <method name="select"> @@ -68,9 +80,9 @@ Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end. [codeblock] text = "Welcome" - select() # Will select "Welcome" - select(4) # Will select "ome" - select(2, 5) # Will select "lco" + select() # Will select "Welcome". + select(4) # Will select "ome". + select(2, 5) # Will select "lco". [/codeblock] </description> </method> @@ -84,7 +96,7 @@ </methods> <members> <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0"> - Text alignment as defined in the [code]ALIGN_*[/code] enum. + Text alignment as defined in the [enum Align] enum. </member> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> If [code]true[/code], the caret (visual cursor) blinks. @@ -96,7 +108,7 @@ The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it. </member> <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false"> - If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty. + If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty, which can be used to clear the text quickly. </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true"> If [code]true[/code], the context menu will appear when right-clicked. @@ -128,14 +140,22 @@ The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character. </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> + If [code]false[/code], it's impossible to select the text using mouse nor keyboard. </member> <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> + If [code]false[/code], using shortcuts will be disabled. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> String value of the [LineEdit]. + [b]Note:[/b] Changing text using this property won't emit the [signal text_changed] signal. </member> </members> <signals> + <signal name="text_change_rejected"> + <description> + Emitted when trying to append text that would overflow the [member max_length]. + </description> + </signal> <signal name="text_changed"> <argument index="0" name="new_text" type="String"> </argument> @@ -192,30 +212,43 @@ </constants> <theme_items> <theme_item name="clear" type="Texture"> + Texture for the clear button. See [member clear_button_enabled]. </theme_item> <theme_item name="clear_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Color used as default tint for the clear button. </theme_item> <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + Color used for the clear button when it's pressed. </theme_item> <theme_item name="cursor_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Color of the [LineEdit]'s visual cursor (caret). </theme_item> <theme_item name="focus" type="StyleBox"> + Background used when [LineEdit] has GUI focus. </theme_item> <theme_item name="font" type="Font"> + Font used for the text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default font color. </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> + Font color for selected text (inside the selection rectangle). </theme_item> <theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + Font color when editing is disabled. </theme_item> <theme_item name="minimum_spaces" type="int" default="12"> + Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of space characters (i.e. this amount of space characters can be displayed without scrolling). </theme_item> <theme_item name="normal" type="StyleBox"> + Default background for the [LineEdit]. </theme_item> <theme_item name="read_only" type="StyleBox"> + Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). </theme_item> <theme_item name="selection_color" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> + Color of the selection rectangle. </theme_item> </theme_items> </class> diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml index fbab1dbe3c..33352b7d98 100644 --- a/doc/classes/LineShape2D.xml +++ b/doc/classes/LineShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LineShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="LineShape2D" inherits="Shape2D" version="4.0"> <brief_description> Line shape for 2D collisions. </brief_description> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index af4c255b92..13d3355da5 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LinkButton" inherits="BaseButton" category="Core" version="3.2"> +<class name="LinkButton" inherits="BaseButton" version="4.0"> <brief_description> Simple button used to represent a link to some resource. </brief_description> @@ -15,8 +15,10 @@ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" /> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="2" /> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> + The button's text that will be displayed inside the button's area. </member> <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode" default="0"> + Determines when to show the underline. See [enum UnderlineMode] for options. </member> </members> <constants> @@ -32,16 +34,22 @@ </constants> <theme_items> <theme_item name="focus" type="StyleBox"> + [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> <theme_item name="font" type="Font"> + [Font] of the [LinkButton]'s text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default text [Color] of the [LinkButton]. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Text [Color] used when the [LinkButton] is being hovered. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [LinkButton] is being pressed. </theme_item> <theme_item name="underline_spacing" type="int" default="2"> + The vertical space between the baseline of text and the underline. </theme_item> </theme_items> </class> diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml index 130263a069..72bbfa29d4 100644 --- a/doc/classes/Listener.xml +++ b/doc/classes/Listener.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Listener" inherits="Spatial" category="Core" version="3.2"> +<class name="Listener" inherits="Spatial" version="4.0"> <brief_description> + Overrides the location sounds are heard from. </brief_description> <description> + Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera]. + [b]Note:[/b] There is no 2D equivalent for this node yet. </description> <tutorials> </tutorials> @@ -11,24 +14,29 @@ <return type="void"> </return> <description> + Disables the listener to use the current camera's listener instead. </description> </method> <method name="get_listener_transform" qualifiers="const"> <return type="Transform"> </return> <description> + Returns the listener's global orthonormalized [Transform]. </description> </method> <method name="is_current" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise. + [b]Note:[/b] There may be more than one Listener marked as "current" in the scene tree, but only the one that was made current last will be used. </description> </method> <method name="make_current"> <return type="void"> </return> <description> + Enables the listener. This will override the current camera's listener. </description> </method> </methods> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 9457800825..2ae7eacdb6 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MainLoop" inherits="Object" category="Core" version="3.2"> +<class name="MainLoop" inherits="Object" version="4.0"> <brief_description> Abstract base class for the game's main loop. </brief_description> @@ -69,6 +69,7 @@ <argument index="1" name="meta" type="Variant"> </argument> <description> + Called when the user performs an action in the system global menu (e.g. the Mac OS menu bar). </description> </method> <method name="_idle" qualifiers="virtual"> @@ -174,7 +175,7 @@ <argument index="1" name="granted" type="bool"> </argument> <description> - Emitted when an user responds to permission request. + Emitted when a user responds to a permission request. </description> </signal> </signals> diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml index 08e8098a75..fb5f437239 100644 --- a/doc/classes/MarginContainer.xml +++ b/doc/classes/MarginContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MarginContainer" inherits="Container" category="Core" version="3.2"> +<class name="MarginContainer" inherits="Container" version="4.0"> <brief_description> Simple margin container. </brief_description> diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml index 083a3163ce..f9ca391f1c 100644 --- a/doc/classes/Marshalls.xml +++ b/doc/classes/Marshalls.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Marshalls" inherits="Reference" category="Core" version="3.2"> +<class name="Marshalls" inherits="Reference" version="4.0"> <brief_description> Data transformation (marshalling) and encoding helpers. </brief_description> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index f584c5207a..ba74be330e 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Material" inherits="Resource" category="Core" version="3.2"> +<class name="Material" inherits="Resource" version="4.0"> <brief_description> Abstract base [Resource] for coloring and shading geometry. </brief_description> @@ -12,8 +12,12 @@ </methods> <members> <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass"> + Sets the [Material] to be used for the next pass. This renders the object again using a different material. + [b]Note:[/b] only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial". </member> <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> + Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. + [b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are sorted based on depth, while transparent objects are sorted from back to front (subject to priority). </member> </members> <constants> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 52fb4b9ca1..6ec9d60df4 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MenuButton" inherits="Button" category="Core" version="3.2"> +<class name="MenuButton" inherits="Button" version="4.0"> <brief_description> Special button that brings up a [PopupMenu] when clicked. </brief_description> <description> - Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs. + Special button that brings up a [PopupMenu] when clicked. + New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each items new properties. </description> <tutorials> </tutorials> @@ -22,6 +23,7 @@ <argument index="0" name="disabled" type="bool"> </argument> <description> + If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button. </description> </method> </methods> @@ -31,7 +33,7 @@ <member name="flat" type="bool" setter="set_flat" getter="is_flat" override="true" default="true" /> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" /> <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="false"> - If [code]true[/code], when the cursor hovers above another MenuButton within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current MenuButton and open the other one. + If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current [MenuButton] and open the other one. </member> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" /> </members> @@ -46,26 +48,37 @@ </constants> <theme_items> <theme_item name="disabled" type="StyleBox"> + [StyleBox] used when the [MenuButton] is disabled. </theme_item> <theme_item name="focus" type="StyleBox"> + [StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> <theme_item name="font" type="Font"> + [Font] of the [MenuButton]'s text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default text [Color] of the [MenuButton]. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 1, 1, 1, 0.3 )"> + Text [Color] used when the [MenuButton] is disabled. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Text [Color] used when the [MenuButton] is being hovered. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [MenuButton] is being pressed. </theme_item> <theme_item name="hover" type="StyleBox"> + [StyleBox] used when the [MenuButton] is being hovered. </theme_item> <theme_item name="hseparation" type="int" default="3"> + The horizontal space between [MenuButton]'s icon and text. </theme_item> <theme_item name="normal" type="StyleBox"> + Default [StyleBox] for the [MenuButton]. </theme_item> <theme_item name="pressed" type="StyleBox"> + [StyleBox] used when the [MenuButton] is being pressed. </theme_item> </theme_items> </class> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index f7b3b0d7ea..67b6045152 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Mesh" inherits="Resource" category="Core" version="3.2"> +<class name="Mesh" inherits="Resource" version="4.0"> <brief_description> A [Resource] that contains vertex array-based geometry. </brief_description> @@ -40,6 +40,14 @@ Generate a [TriangleMesh] from the mesh. </description> </method> + <method name="get_aabb" qualifiers="const"> + <return type="AABB"> + </return> + <description> + Returns the smallest [AABB] enclosing this mesh. Not affected by [code]custom_aabb[/code]. + [b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh]. + </description> + </method> <method name="get_faces" qualifiers="const"> <return type="PoolVector3Array"> </return> @@ -95,6 +103,7 @@ </methods> <members> <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )"> + Sets a hint to be used for lightmap resolution in [BakedLightmap]. Overrides [member BakedLightmap.bake_default_texels_per_unit]. </member> </members> <constants> @@ -120,52 +129,73 @@ Render array as triangle fans. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> + Mesh array contains vertices. All meshes require a vertex array so this should always be present. </constant> <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> + Mesh array contains normals. </constant> <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> + Mesh array contains tangents. </constant> <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> + Mesh array contains colors. </constant> <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> + Mesh array contains UVs. </constant> <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> + Mesh array contains second UV. </constant> <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat"> + Mesh array contains bones. </constant> <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat"> + Mesh array contains bone weights. </constant> <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> - </constant> - <constant name="ARRAY_COMPRESS_BASE" value="9" enum="ArrayFormat"> + Mesh array uses indices. </constant> <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat"> + Flag used to mark a compressed (half float) vertex array. </constant> <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat"> + Flag used to mark a compressed (half float) normal array. </constant> <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat"> + Flag used to mark a compressed (half float) tangent array. </constant> <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat"> + Flag used to mark a compressed (half float) color array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat"> + Flag used to mark a compressed (half float) UV coordinates array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> + Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> + Flag used to mark a compressed bone array. </constant> <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> + Flag used to mark a compressed (half float) weight array. </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> + Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> + Flag used to mark that the array contains 2D vertices. </constant> <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat"> + Flag used to mark that the array uses 16-bit bones instead of 8-bit. </constant> <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat"> + Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly. </constant> <constant name="ARRAY_VERTEX" value="0" enum="ArrayType"> Array of vertices. diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 22c31306bf..5c6401521a 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MeshDataTool" inherits="Reference" category="Core" version="3.2"> +<class name="MeshDataTool" inherits="Reference" version="4.0"> <brief_description> Helper tool to access and edit [Mesh] data. </brief_description> diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml index a4d2bb4295..6123dfa37a 100644 --- a/doc/classes/MeshInstance.xml +++ b/doc/classes/MeshInstance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.2"> +<class name="MeshInstance" inherits="GeometryInstance" version="4.0"> <brief_description> Node that instances meshes into a scenario. </brief_description> @@ -66,6 +66,7 @@ [NodePath] to the [Skeleton] associated with the instance. </member> <member name="skin" type="Skin" setter="set_skin" getter="get_skin"> + Sets the skin to be used by this instance. </member> </members> <constants> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 4b38b9aa96..a14ad1d4cd 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MeshInstance2D" inherits="Node2D" category="Core" version="3.2"> +<class name="MeshInstance2D" inherits="Node2D" version="4.0"> <brief_description> Node used for displaying a [Mesh] in 2D. </brief_description> <description> - Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite] use tool in Toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". + Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite] via a tool in the editor toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_meshes.html</link> </tutorials> <methods> </methods> @@ -25,6 +25,7 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the [member texture] is changed. </description> </signal> </signals> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index 44dc4f334f..95c046398a 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MeshLibrary" inherits="Resource" category="Core" version="3.2"> +<class name="MeshLibrary" inherits="Resource" version="4.0"> <brief_description> Library of meshes. </brief_description> <description> - A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. This resource is used in [GridMap]. + A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap]. </description> <tutorials> </tutorials> @@ -22,7 +22,8 @@ <argument index="0" name="id" type="int"> </argument> <description> - Create a new item in the library, supplied as an ID. + Creates a new item in the library with the given ID. + You can get an unused ID from [method get_last_unused_item_id]. </description> </method> <method name="find_item_by_name" qualifiers="const"> @@ -31,13 +32,14 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the first item with the given name. </description> </method> <method name="get_item_list" qualifiers="const"> <return type="PoolIntArray"> </return> <description> - Returns the list of items. + Returns the list of item IDs in use. </description> </method> <method name="get_item_mesh" qualifiers="const"> @@ -46,7 +48,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the mesh of the item. + Returns the item's mesh. </description> </method> <method name="get_item_name" qualifiers="const"> @@ -55,7 +57,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the name of the item. + Returns the item's name. </description> </method> <method name="get_item_navmesh" qualifiers="const"> @@ -64,6 +66,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the item's navigation mesh. </description> </method> <method name="get_item_navmesh_transform" qualifiers="const"> @@ -72,6 +75,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the transform applied to the item's navigation mesh. </description> </method> <method name="get_item_preview" qualifiers="const"> @@ -90,6 +94,8 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns an item's collision shapes. + The array consists of each [Shape] followed by its [Transform]. </description> </method> <method name="get_last_unused_item_id" qualifiers="const"> @@ -128,6 +134,7 @@ </argument> <description> Sets the item's name. + This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name]. </description> </method> <method name="set_item_navmesh"> @@ -138,6 +145,7 @@ <argument index="1" name="navmesh" type="NavigationMesh"> </argument> <description> + Sets the item's navigation mesh. </description> </method> <method name="set_item_navmesh_transform"> @@ -148,6 +156,7 @@ <argument index="1" name="navmesh" type="Transform"> </argument> <description> + Sets the transform to apply to the item's navigation mesh. </description> </method> <method name="set_item_preview"> @@ -158,6 +167,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets a texture to use as the item's preview icon in the editor. </description> </method> <method name="set_item_shapes"> @@ -168,6 +178,8 @@ <argument index="1" name="shapes" type="Array"> </argument> <description> + Sets an item's collision shapes. + The array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]. </description> </method> </methods> diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml index 2c94014879..6e18517ef1 100644 --- a/doc/classes/MeshTexture.xml +++ b/doc/classes/MeshTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MeshTexture" inherits="Texture" category="Core" version="3.2"> +<class name="MeshTexture" inherits="Texture" version="4.0"> <brief_description> Simple texture that uses a mesh to draw itself. </brief_description> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 8a72aa155b..270ac08178 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MultiMesh" inherits="Resource" category="Core" version="3.2"> +<class name="MultiMesh" inherits="Resource" version="4.0"> <brief_description> Provides high-performance mesh instancing. </brief_description> @@ -10,7 +10,8 @@ Since instances may have any behavior, the AABB used for visibility must be provided by the user. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> <methods> <method name="get_aabb" qualifiers="const"> @@ -87,7 +88,7 @@ <argument index="1" name="custom_data" type="Color"> </argument> <description> - Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers. + Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [enum CustomDataFormat] used. </description> </method> <method name="set_instance_transform"> @@ -153,7 +154,7 @@ Use when you are not using per-instance custom data. </constant> <constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat"> - Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision. + Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision and range. Floats packed into 8 bits can only represent values between 0 and 1, numbers outside that range will be clamped. </constant> <constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat"> The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision. diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml index 16f16fdc8b..6cbc0a8e04 100644 --- a/doc/classes/MultiMeshInstance.xml +++ b/doc/classes/MultiMeshInstance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MultiMeshInstance" inherits="GeometryInstance" category="Core" version="3.2"> +<class name="MultiMeshInstance" inherits="GeometryInstance" version="4.0"> <brief_description> Node that instances a [MultiMesh]. </brief_description> @@ -8,8 +8,9 @@ This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> - <link>http://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/using_multi_mesh_instance.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> <methods> </methods> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index 8509986c3c..5c0e85d3fe 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MultiMeshInstance2D" inherits="Node2D" category="Core" version="3.2"> +<class name="MultiMeshInstance2D" inherits="Node2D" version="4.0"> <brief_description> Node that instances a [MultiMesh] in 2D. </brief_description> @@ -25,6 +25,7 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the [member texture] is changed. </description> </signal> </signals> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 5f8c7ed120..f34d3c5da4 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="MultiplayerAPI" inherits="Reference" category="Core" version="3.2"> +<class name="MultiplayerAPI" inherits="Reference" version="4.0"> <brief_description> High-level multiplayer API. </brief_description> @@ -92,7 +92,7 @@ [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. </member> <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections. diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index 8a294425e6..2de1f71867 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Mutex" inherits="Reference" category="Core" version="3.2"> +<class name="Mutex" inherits="Reference" version="4.0"> <brief_description> A synchronization mutex (mutual exclusion). </brief_description> diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index 58b7d1255e..615ccf6c36 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Navigation" inherits="Spatial" category="Core" version="3.2"> +<class name="Navigation" inherits="Spatial" version="4.0"> <brief_description> Mesh-based navigation and pathfinding node. </brief_description> diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml index ea1b992d79..ba15c59238 100644 --- a/doc/classes/Navigation2D.xml +++ b/doc/classes/Navigation2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Navigation2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Navigation2D" inherits="Node2D" version="4.0"> <brief_description> 2D navigation and pathfinding node. </brief_description> diff --git a/doc/classes/Navigation2DServer.xml b/doc/classes/Navigation2DServer.xml new file mode 100644 index 0000000000..105d6aabf8 --- /dev/null +++ b/doc/classes/Navigation2DServer.xml @@ -0,0 +1,274 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Navigation2DServer" inherits="Object" category="Core" version="3.2"> + <brief_description> + Server interface for low-level 2D navigation access + </brief_description> + <description> + Navigation2DServer is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + </description> + <tutorials> + </tutorials> + <methods> + <method name="agent_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates the agent. + </description> + </method> + <method name="agent_is_map_changed"> + <return type="bool" qualifiers="const"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <description> + Returns true if the map got changed the previous frame. + </description> + </method> + <method name="agent_set_callback" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="receiver" type="Object"> + </argument> + <argument index="2" name="method" type="String"> + </argument> + <argument index="3" name="userdata" type="Variant" default="null"> + </argument> + <description> + Callback called at the end of the RVO process. + </description> + </method> + <method name="agent_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Puts the agent in the map. + </description> + </method> + <method name="agent_set_max_neighbors" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="count" type="int"> + </argument> + <description> + Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_max_speed" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="max_speed" type="float"> + </argument> + <description> + Sets the maximum speed of the agent. Must be positive. + </description> + </method> + <method name="agent_set_neighbor_dist" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="dist" type="float"> + </argument> + <description> + Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_position" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="position" type="Vector3"> + </argument> + <description> + Sets the position of the agent in world space. + </description> + </method> + <method name="agent_set_radius" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="radius" type="float"> + </argument> + <description> + Sets the radius of the agent. + </description> + </method> + <method name="agent_set_target_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="target_velocity" type="Vector3"> + </argument> + <description> + Sets the new target velocity. + </description> + </method> + <method name="agent_set_time_horizon" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="time" type="float"> + </argument> + <description> + The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. + </description> + </method> + <method name="agent_set_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="velocity" type="Vector3"> + </argument> + <description> + Sets the current velocity of the agent. + </description> + </method> + <method name="free" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="object" type="RID"> + </argument> + <description> + Destroy the RID + </description> + </method> + <method name="map_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Create a new map. + </description> + </method> + <method name="map_get_cell_size"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the map cell size. + </description> + </method> + <method name="map_get_edge_connection_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. + </description> + </method> + <method name="map_get_path" qualifiers="const"> + <return type="PoolVector2Array"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="origin" type="Vector2"> + </argument> + <argument index="2" name="destination" type="Vector2"> + </argument> + <argument index="3" name="optimize" type="bool"> + </argument> + <description> + Returns the navigation path to reach the destination from the origin, while avoiding static obstacles. + </description> + </method> + <method name="map_is_active" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns true if the map is active. + </description> + </method> + <method name="map_set_active" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="active" type="bool"> + </argument> + <description> + Sets the map active. + </description> + </method> + <method name="map_set_cell_size" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="cell_size" type="float"> + </argument> + <description> + Set the map cell size used to weld the navigation mesh polygons. + </description> + </method> + <method name="map_set_edge_connection_margin" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="margin" type="float"> + </argument> + <description> + Set the map edge connection margin used to weld the compatible region edges. + </description> + </method> + <method name="region_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates a new region. + </description> + </method> + <method name="region_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Sets the map for the region. + </description> + </method> + <method name="region_set_navpoly" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="nav_poly" type="NavigationPolygon"> + </argument> + <description> + Sets the navigation mesh for the region. + </description> + </method> + <method name="region_set_transform" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform"> + </argument> + <description> + Sets the global transformation for the region. + </description> + </method> + </methods> +</class> diff --git a/doc/classes/NavigationAgent.xml b/doc/classes/NavigationAgent.xml new file mode 100644 index 0000000000..d0e2a60fbf --- /dev/null +++ b/doc/classes/NavigationAgent.xml @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationAgent" inherits="Node" category="Core" version="3.2"> + <brief_description> + 3D Agent used in navigation for collision avoidance. + </brief_description> + <description> + 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation] node, or using [method set_navigation]. [NavigationAgent] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="distance_to_target" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. + </description> + </method> + <method name="get_final_location"> + <return type="Vector3"> + </return> + <description> + Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. + </description> + </method> + <method name="get_nav_path" qualifiers="const"> + <return type="PoolVector3Array"> + </return> + <description> + Returns the path from start to finish in global coordinates. + </description> + </method> + <method name="get_nav_path_index" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns which index the agent is currently on in the navigation path's [PoolVector3Array]. + </description> + </method> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation] node that the agent is using for its navigation system. + </description> + </method> + <method name="get_next_location"> + <return type="Vector3"> + </return> + <description> + Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. + </description> + </method> + <method name="get_target_location" qualifiers="const"> + <return type="Vector3"> + </return> + <description> + Returns the user defined [Vector3] after setting the target location. + </description> + </method> + <method name="is_navigation_finished"> + <return type="bool"> + </return> + <description> + Returns true if the navigation path's final location has been reached. + </description> + </method> + <method name="is_target_reachable"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reachable. The target location is set using [method set_target_location]. + </description> + </method> + <method name="is_target_reached" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation] node. + </description> + </method> + <method name="set_target_location"> + <return type="void"> + </return> + <argument index="0" name="location" type="Vector3"> + </argument> + <description> + Sets the user desired final location. This will clear the current navigation path. + </description> + </method> + <method name="set_velocity"> + <return type="void"> + </return> + <argument index="0" name="velocity" type="Vector3"> + </argument> + <description> + Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. + </description> + </method> + </methods> + <members> + <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0"> + The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. + </member> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + The radius of the agent. + </member> + <member name="agent_height_offset" type="float" setter="set_agent_height_offset" getter="get_agent_height_offset" default="0.0"> + The agent height offset to match the navigation mesh height. + </member> + <member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="50.0"> + The distance to search for other agents. + </member> + <member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10"> + The maximum number of neighbors for the agent to consider. + </member> + <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0"> + The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. + </member> + <member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="10.0"> + The maximum speed that an agent can move. + </member> + <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> + The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceded, it recalculates the ideal path. + </member> + <member name="ignore_y" type="bool" setter="set_ignore_y" getter="get_ignore_y" default="true"> + Ignores collisions on the Y axis. Must be true to move on a horizontal plane. + </member> + </members> + <signals> + <signal name="navigation_finished"> + <description> + Notifies when the final location is reached. + </description> + </signal> + <signal name="path_changed"> + <description> + Notifies when the navigation path changes. + </description> + </signal> + <signal name="target_reached"> + <description> + Notifies when the player defined target, set with [method set_target_location], is reached. + </description> + </signal> + <signal name="velocity_computed"> + <argument index="0" name="safe_velocity" type="Vector2"> + </argument> + <description> + Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. + </description> + </signal> + </signals> +</class> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml new file mode 100644 index 0000000000..dd3a8aa011 --- /dev/null +++ b/doc/classes/NavigationAgent2D.xml @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationAgent2D" inherits="Node" category="Core" version="3.2"> + <brief_description> + 2D Agent used in navigation for collision avoidance. + </brief_description> + <description> + 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationAgent2D] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="distance_to_target" qualifiers="const"> + <return type="float"> + </return> + <description> + Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. + </description> + </method> + <method name="get_final_location"> + <return type="Vector2"> + </return> + <description> + Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. + </description> + </method> + <method name="get_nav_path" qualifiers="const"> + <return type="PoolVector2Array"> + </return> + <description> + Returns the path from start to finish in global coordinates. + </description> + </method> + <method name="get_nav_path_index" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns which index the agent is currently on in the navigation path's [PoolVector2Array]. + </description> + </method> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation2D] node that the agent is using for its navigation system. + </description> + </method> + <method name="get_next_location"> + <return type="Vector2"> + </return> + <description> + Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. + </description> + </method> + <method name="get_target_location" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the user defined [Vector2] after setting the target location. + </description> + </method> + <method name="is_navigation_finished"> + <return type="bool"> + </return> + <description> + Returns true if the navigation path's final location has been reached. + </description> + </method> + <method name="is_target_reachable"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reachable. The target location is set using [method set_target_location]. + </description> + </method> + <method name="is_target_reached" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation2D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation2D] node. + </description> + </method> + <method name="set_target_location"> + <return type="void"> + </return> + <argument index="0" name="location" type="Vector2"> + </argument> + <description> + Sets the user desired final location. This will clear the current navigation path. + </description> + </method> + <method name="set_velocity"> + <return type="void"> + </return> + <argument index="0" name="velocity" type="Vector2"> + </argument> + <description> + Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. + </description> + </method> + </methods> + <members> + <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0"> + The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area. + </member> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> + The radius of the agent. + </member> + <member name="neighbor_dist" type="float" setter="set_neighbor_dist" getter="get_neighbor_dist" default="500.0"> + The distance to search for other agents. + </member> + <member name="max_neighbors" type="int" setter="set_max_neighbors" getter="get_max_neighbors" default="10"> + The maximum number of neighbors for the agent to consider. + </member> + <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0"> + The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. + </member> + <member name="max_speed" type="float" setter="set_max_speed" getter="get_max_speed" default="200.0"> + The maximum speed that an agent can move. + </member> + <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> + The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceded, it recalculates the ideal path. + </member> + </members> + <signals> + <signal name="navigation_finished"> + <description> + Notifies when the final location is reached. + </description> + </signal> + <signal name="path_changed"> + <description> + Notifies when the navigation path changes. + </description> + </signal> + <signal name="target_reached"> + <description> + Notifies when the player defined target, set with [method set_target_location], is reached. + </description> + </signal> + <signal name="velocity_computed"> + <argument index="0" name="safe_velocity" type="Vector2"> + </argument> + <description> + Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. + </description> + </signal> + </signals> +</class> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 6528704bb5..fb3babf4aa 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationMesh" inherits="Resource" category="Core" version="3.2"> +<class name="NavigationMesh" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml index 2f9cc58aea..75bd62e278 100644 --- a/doc/classes/NavigationMeshInstance.xml +++ b/doc/classes/NavigationMeshInstance.xml @@ -1,19 +1,42 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationMeshInstance" inherits="Spatial" category="Core" version="3.2"> +<class name="NavigationMeshInstance" inherits="Spatial" version="4.0"> <brief_description> + An instance of a [NavigationMesh]. </brief_description> <description> + An instance of a [NavigationMesh]. It tells the [Navigation] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation] node. </description> <tutorials> </tutorials> <methods> + <method name="bake_navigation_mesh"> + <return type="void"> + </return> + <description> + Bakes the [NavigationMesh]. The baking is done in a seperate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh]. + </description> + </method> </methods> <members> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> + Determines if the [NavigationMeshInstance] is enabled or disabled. </member> <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> + The [NavigationMesh] resource to use. </member> </members> + <signals> + <signal name="bake_finished"> + <description> + Notifies when the navigation mesh bake operation is completed. + </description> + </signal> + <signal name="navigation_mesh_changed"> + <description> + Notifies when the [NavigationMesh] has changed. + </description> + </signal> + </signals> <constants> </constants> </class> diff --git a/doc/classes/NavigationObstacle.xml b/doc/classes/NavigationObstacle.xml new file mode 100644 index 0000000000..307538b77b --- /dev/null +++ b/doc/classes/NavigationObstacle.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationObstacle" inherits="Node" category="Core" version="3.2"> + <brief_description> + 3D Obstacle used in navigation for collision avoidance. + </brief_description> + <description> + 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation] node, or using [method set_navigation]. [NavigationObstacle] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation] node that the obstacle is using for its navigation system. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation] node. + </description> + </method> + </methods> +</class> diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml new file mode 100644 index 0000000000..cf5dd2fa10 --- /dev/null +++ b/doc/classes/NavigationObstacle2D.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationObstacle2D" inherits="Node" category="Core" version="3.2"> + <brief_description> + 2D Obstacle used in navigation for collision avoidance. + </brief_description> + <description> + 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle] is physics safe. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_navigation" qualifiers="const"> + <return type="Node"> + </return> + <description> + Returns the [Navigation2D] node that the obstacle is using for its navigation system. + </description> + </method> + <method name="set_navigation"> + <return type="void"> + </return> + <argument index="0" name="navigation" type="Node"> + </argument> + <description> + Sets the [Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation2D] node. + </description> + </method> + </methods> +</class> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index 555f308660..0157a6f3f7 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.2"> +<class name="NavigationPolygon" inherits="Resource" version="4.0"> <brief_description> A node that has methods to draw outlines or use indices of vertices to create navigation polygons. </brief_description> diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationPolygonInstance.xml index 83f3386af6..34c6b09859 100644 --- a/doc/classes/NavigationPolygonInstance.xml +++ b/doc/classes/NavigationPolygonInstance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NavigationPolygonInstance" inherits="Node2D" category="Core" version="3.2"> +<class name="NavigationPolygonInstance" inherits="Node2D" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml new file mode 100644 index 0000000000..894a46b8a7 --- /dev/null +++ b/doc/classes/NavigationServer.xml @@ -0,0 +1,323 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NavigationServer" inherits="Object" category="Core" version="3.2"> + <brief_description> + Server interface for low-level 3D navigation access + </brief_description> + <description> + NavigationServer is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. + </description> + <tutorials> + </tutorials> + <methods> + <method name="agent_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates the agent. + </description> + </method> + <method name="agent_is_map_changed"> + <return type="bool" qualifiers="const"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <description> + Returns true if the map got changed the previous frame. + </description> + </method> + <method name="agent_set_callback" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="receiver" type="Object"> + </argument> + <argument index="2" name="method" type="String"> + </argument> + <argument index="3" name="userdata" type="Variant" default="null"> + </argument> + <description> + Callback called at the end of the RVO process. + </description> + </method> + <method name="agent_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Puts the agent in the map. + </description> + </method> + <method name="agent_set_max_neighbors" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="count" type="int"> + </argument> + <description> + Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_max_speed" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="max_speed" type="float"> + </argument> + <description> + Sets the maximum speed of the agent. Must be positive. + </description> + </method> + <method name="agent_set_neighbor_dist" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="dist" type="float"> + </argument> + <description> + Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + </description> + </method> + <method name="agent_set_position" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="position" type="Vector3"> + </argument> + <description> + Sets the position of the agent in world space. + </description> + </method> + <method name="agent_set_radius" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="radius" type="float"> + </argument> + <description> + Sets the radius of the agent. + </description> + </method> + <method name="agent_set_target_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="target_velocity" type="Vector3"> + </argument> + <description> + Sets the new target velocity. + </description> + </method> + <method name="agent_set_time_horizon" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="time" type="float"> + </argument> + <description> + The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. + </description> + </method> + <method name="agent_set_velocity" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="agent" type="RID"> + </argument> + <argument index="1" name="velocity" type="Vector3"> + </argument> + <description> + Sets the current velocity of the agent. + </description> + </method> + <method name="free" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="object" type="RID"> + </argument> + <description> + Destroy the RID + </description> + </method> + <method name="map_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Create a new map. + </description> + </method> + <method name="map_get_cell_size"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the map cell size. + </description> + </method> + <method name="map_get_edge_connection_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the edge connection margin of the map. + </description> + </method> + <method name="map_get_path" qualifiers="const"> + <return type="PoolVector3Array"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="origin" type="Vector3"> + </argument> + <argument index="2" name="destination" type="Vector3"> + </argument> + <argument index="3" name="optimize" type="bool"> + </argument> + <description> + Returns the navigation path to reach the destination from the origin. + </description> + </method> + <method name="map_get_up" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns the map's up direction. + </description> + </method> + <method name="map_is_active" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <description> + Returns true if the map is active. + </description> + </method> + <method name="map_set_active" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="active" type="bool"> + </argument> + <description> + Sets the map active. + </description> + </method> + <method name="map_set_cell_size" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="cell_size" type="float"> + </argument> + <description> + Set the map cell size used to weld the navigation mesh polygons. + </description> + </method> + <method name="map_set_edge_connection_margin" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="margin" type="float"> + </argument> + <description> + Set the map edge connection margein used to weld the compatible region edges. + </description> + </method> + <method name="map_set_up" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="map" type="RID"> + </argument> + <argument index="1" name="up" type="Vector3"> + </argument> + <description> + Sets the map up direction. + </description> + </method> + <method name="region_bake_navmesh" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="mesh" type="NavigationMesh"> + </argument> + <argument index="1" name="node" type="Node"> + </argument> + <description> + Bakes the navigation mesh. + </description> + </method> + <method name="region_create" qualifiers="const"> + <return type="RID"> + </return> + <description> + Creates a new region. + </description> + </method> + <method name="region_set_map" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="map" type="RID"> + </argument> + <description> + Sets the map for the region. + </description> + </method> + <method name="region_set_navmesh" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="nav_mesh" type="NavigationMesh"> + </argument> + <description> + Sets the navigation mesh for the region. + </description> + </method> + <method name="region_set_transform" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="region" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform"> + </argument> + <description> + Sets the global transformation for the region. + </description> + </method> + <method name="set_active" qualifiers="const"> + <return type="void"> + </return> + <argument index="0" name="active" type="bool"> + </argument> + <description> + Control activation of this server. + </description> + </method> + <method name="step"> + <return type="void"> + </return> + <argument index="0" name="delta_time" type="float"> + </argument> + <description> + Steps the server. This is not threadsafe and must be called in single thread. + </description> + </method> + </methods> +</class> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index 4f212cf392..ff97ea926d 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" category="Core" version="3.2"> +<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" version="4.0"> <brief_description> A high-level network interface to simplify multiplayer interactions. </brief_description> diff --git a/doc/classes/Nil.xml b/doc/classes/Nil.xml deleted file mode 100644 index a5c1ade6ed..0000000000 --- a/doc/classes/Nil.xml +++ /dev/null @@ -1,169 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="Nil" category="Built-In Types" version="3.2"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="Nil"> - <argument index="0" name="from" type="PoolColorArray"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="PoolVector3Array"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="PoolVector2Array"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="PoolStringArray"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="PoolRealArray"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="PoolIntArray"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="PoolByteArray"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Array"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Dictionary"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Object"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="RID"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="NodePath"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Color"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Transform"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Basis"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="AABB"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Quat"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Plane"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Transform2D"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Vector3"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Rect2"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="String"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="float"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="int"> - </argument> - <description> - </description> - </method> - <method name="Nil"> - <argument index="0" name="from" type="bool"> - </argument> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index 221a3c22c1..68326d7e77 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NinePatchRect" inherits="Control" category="Core" version="3.2"> +<class name="NinePatchRect" inherits="Control" version="4.0"> <brief_description> Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes. </brief_description> @@ -15,6 +15,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the margin identified by the given [enum Margin] constant. </description> </method> <method name="set_patch_margin"> @@ -25,6 +26,7 @@ <argument index="1" name="value" type="int"> </argument> <description> + Sets the size of the margin identified by the given [enum Margin] constant to [code]value[/code] in pixels. </description> </method> </methods> @@ -61,7 +63,7 @@ <signals> <signal name="texture_changed"> <description> - Fired when the node's texture changes. + Emitted when the node's texture changes. </description> </signal> </signals> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index cecbce90b3..1847954b67 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Node" inherits="Object" category="Core" version="3.2"> +<class name="Node" inherits="Object" version="4.0"> <brief_description> Base class for all [i]scene[/i] objects. </brief_description> @@ -33,7 +33,7 @@ </return> <description> Called when the node is about to leave the [SceneTree] (e.g. upon freeing, scene changing, or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree. - Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited] + Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]. </description> </method> <method name="_get_configuration_warning" qualifiers="virtual"> @@ -129,6 +129,7 @@ child_node.get_parent().remove_child(child_node) add_child(child_node) [/codeblock] + [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view. </description> </method> <method name="add_child_below_node"> @@ -251,7 +252,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> - Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and attempts to access it will result in an "Attempt to call <method> on a null instance." error. + Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call <method> on a null instance." error. [b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). [b]Example:[/b] Assume your current node is Character and the following tree: [codeblock] @@ -295,7 +296,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> - Similar to [method get_node], but does not raise an error if [code]path[/code] does not point to a valid [Node]. + Similar to [method get_node], but does not log an error if [code]path[/code] does not point to a valid [Node]. </description> </method> <method name="get_parent" qualifiers="const"> @@ -839,7 +840,7 @@ Pause mode. How the node will behave if the [SceneTree] is paused. </member> <member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0"> - The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first. + The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first. </member> </members> <signals> @@ -994,6 +995,7 @@ </constant> <constant name="DUPLICATE_USE_INSTANCING" value="8" enum="DuplicateFlags"> Duplicate using instancing. + An instance stays linked to the original so when the original changes, the instance changes too. </constant> </constants> </class> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 29c4680685..9f017e9aed 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Node2D" inherits="CanvasItem" category="Core" version="3.2"> +<class name="Node2D" inherits="CanvasItem" version="4.0"> <brief_description> - A 2D game object, parent of all 2D-related nodes. Has a position, rotation, scale and Z index. + A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. </brief_description> <description> - A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. + A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 0310068a90..e8ab3e536e 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NodePath" category="Built-In Types" version="3.2"> +<class name="NodePath" version="4.0"> <brief_description> Pre-parsed scene tree path. </brief_description> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 6da0547352..e0f73df1bf 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="OS" inherits="Object" category="Core" version="3.2"> +<class name="OS" inherits="Object" version="4.0"> <brief_description> Operating System functions. </brief_description> @@ -45,6 +45,8 @@ <return type="void"> </return> <description> + Shuts down system MIDI driver. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="delay_msec" qualifiers="const"> @@ -93,7 +95,7 @@ </argument> <argument index="1" name="arguments" type="PoolStringArray"> </argument> - <argument index="2" name="blocking" type="bool"> + <argument index="2" name="blocking" type="bool" default="true"> </argument> <argument index="3" name="output" type="Array" default="[ ]"> </argument> @@ -119,6 +121,7 @@ [codeblock] OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output) [/codeblock] + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="find_scancode_from_string" qualifiers="const"> @@ -159,6 +162,7 @@ <description> Returns an array of MIDI device names. The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_current_video_driver" qualifiers="const"> @@ -224,6 +228,7 @@ </return> <description> With this function you can get the list of dangerous permissions that have been granted to the Android application. + [b]Note:[/b] This method is implemented on Android. </description> </method> <method name="get_ime_selection" qualifiers="const"> @@ -232,6 +237,7 @@ <description> Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="get_ime_text" qualifiers="const"> @@ -240,6 +246,7 @@ <description> Returns the IME intermediate composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="get_latin_keyboard_variant" qualifiers="const"> @@ -248,6 +255,7 @@ <description> Returns the current latin keyboard variant as a String. Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Returns [code]"QWERTY"[/code] on unsupported platforms. </description> </method> <method name="get_locale" qualifiers="const"> @@ -262,6 +270,7 @@ </return> <description> Returns the model name of the current device. + [b]Note:[/b] This method is implemented on Android and iOS. Returns [code]"GenericDevice"[/code] on unsupported platforms. </description> </method> <method name="get_name" qualifiers="const"> @@ -275,14 +284,16 @@ <return type="int"> </return> <description> - Returns the amount of battery left in the device as a percentage. + Returns the amount of battery left in the device as a percentage. Returns [code]-1[/code] if power state is unknown. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_power_seconds_left"> <return type="int"> </return> <description> - Returns an estimate of the time left in seconds before the device runs out of battery. + Returns an estimate of the time left in seconds before the device runs out of battery. Returns [code]-1[/code] if power state is unknown. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_power_state"> @@ -290,6 +301,7 @@ </return> <description> Returns the current state of the device regarding battery and power. See [enum PowerState] constants. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_process_id" qualifiers="const"> @@ -297,6 +309,7 @@ </return> <description> Returns the project's process ID. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="get_processor_count" qualifiers="const"> @@ -320,6 +333,7 @@ </argument> <description> Returns the given scancode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]). + See also [member InputEventKey.scancode] and [method InputEventKey.get_scancode_with_modifiers]. </description> </method> <method name="get_screen_count" qualifiers="const"> @@ -345,6 +359,7 @@ xxhdpi - 480 dpi xxxhdpi - 640 dpi [/codeblock] + [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms. </description> </method> <method name="get_screen_position" qualifiers="const"> @@ -393,6 +408,7 @@ </argument> <description> Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir]. + [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. </description> </method> <method name="get_system_time_msecs" qualifiers="const"> @@ -519,6 +535,7 @@ </argument> <description> Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_add_separator"> @@ -528,6 +545,7 @@ </argument> <description> Add a separator between items. Separators also occupy an index. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_clear"> @@ -537,6 +555,7 @@ </argument> <description> Clear the global menu, in effect removing all items. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_remove_item"> @@ -548,6 +567,7 @@ </argument> <description> Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="has_environment" qualifiers="const"> @@ -594,9 +614,9 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the build is a debug build. - Returns [code]true[/code] when running in the editor. - Returns [code]false[/code] if the build is a release build. + Returns [code]true[/code] if the Godot binary used to run the project is a [i]debug[/i] export template, or when running in the editor. + Returns [code]false[/code] if the Godot binary used to run the project is a [i]release[/i] export template. + To check whether the Godot binary used to run the project is an export template (debug or release), use [code]OS.has_feature("standalone")[/code] instead. </description> </method> <method name="is_ok_left_and_cancel_right" qualifiers="const"> @@ -636,6 +656,14 @@ Returns [code]true[/code] if the window should always be on top of other windows. </description> </method> + <method name="is_window_focused" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the window is currently focused. + [b]Note:[/b] Only implemented on desktop platforms. On other platforms, it will always return [code]true[/code]. + </description> + </method> <method name="kill"> <return type="int" enum="Error"> </return> @@ -644,6 +672,7 @@ <description> Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. [b]Note:[/b] This method can also be used to kill processes that were not spawned by the game. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="move_window_to_foreground"> @@ -651,6 +680,7 @@ </return> <description> Moves the window to the front. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="native_video_is_playing"> @@ -658,6 +688,7 @@ </return> <description> Returns [code]true[/code] if native video is playing. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_pause"> @@ -665,6 +696,7 @@ </return> <description> Pauses native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_play"> @@ -680,7 +712,7 @@ </argument> <description> Plays native video from the specified path, at the given volume and with audio and subtitle tracks. - [b]Note:[/b] This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. + [b]Note:[/b] This method is implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. </description> </method> <method name="native_video_stop"> @@ -688,6 +720,7 @@ </return> <description> Stops native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_unpause"> @@ -695,6 +728,7 @@ </return> <description> Resumes native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="open_midi_inputs"> @@ -702,6 +736,7 @@ </return> <description> Initialises the singleton for the system MIDI driver. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="print_all_resources"> @@ -743,6 +778,7 @@ </return> <description> Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="request_permission"> @@ -759,6 +795,7 @@ </return> <description> With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application. + [b]Note:[/b] This method is implemented on Android. </description> </method> <method name="set_icon"> @@ -769,6 +806,7 @@ <description> Sets the game's icon using an [Image] resource. The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed. + [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. </description> </method> <method name="set_ime_active"> @@ -781,6 +819,7 @@ If active IME handles key events before the application and creates an composition string and suggestion list. Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions. Completed composition string is committed when input is finished. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_ime_position"> @@ -790,6 +829,7 @@ </argument> <description> Sets position of IME suggestion list popup (in window coordinates). + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_native_icon"> @@ -800,7 +840,7 @@ <description> Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS). Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog. - [b]Note:[/b] This method is only implemented on macOS and Windows. + [b]Note:[/b] This method is implemented on macOS and Windows. </description> </method> <method name="set_thread_name"> @@ -828,6 +868,7 @@ </argument> <description> Sets whether the window should always be on top. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_window_title"> @@ -838,6 +879,7 @@ <description> Sets the window title to the specified string. [b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers. + [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. </description> </method> <method name="shell_open"> @@ -850,6 +892,7 @@ - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added. + [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. </description> </method> <method name="show_virtual_keyboard"> @@ -859,6 +902,7 @@ </argument> <description> Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + [b]Note:[/b] This method is implemented on Android, iOS and UWP. </description> </method> </methods> @@ -870,7 +914,8 @@ The current screen index (starting from 0). </member> <member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0"> - The exit code passed to the OS when the main loop exits. + The exit code passed to the OS when the main loop exits. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). + [b]Note:[/b] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed. </member> <member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on" default="true"> If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile. @@ -893,6 +938,11 @@ <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled" default="true"> If [code]true[/code], vertical synchronization (Vsync) is enabled. </member> + <member name="vsync_via_compositor" type="bool" setter="set_vsync_via_compositor" getter="is_vsync_via_compositor_enabled" default="false"> + If [code]true[/code] and [code]vsync_enabled[/code] is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode. + [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. + [b]Note:[/b] This property is only implemented on Windows. + </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false"> If [code]true[/code], removes the window frame. [b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. @@ -910,6 +960,7 @@ If [code]true[/code], the window background is transparent and window frame is removed. Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering. [b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled. + [b]Note:[/b] This property is implemented on HTML5, Linux, macOS and Windows. </member> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )"> The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 4b77197e29..858bf5b635 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Object" category="Core" version="3.2"> +<class name="Object" version="4.0"> <brief_description> Base class for all non built-in types. </brief_description> @@ -9,6 +9,12 @@ Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++. Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. + Property membership can be tested directly in GDScript using [code]in[/code]: + [codeblock] + var n = Node2D.new() + print("position" in n) # Prints "True". + print("other_property" in n) # Prints "False". + [/codeblock] Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification]. </description> <tutorials> @@ -93,12 +99,12 @@ </description> </method> <method name="call_deferred" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="method" type="String"> </argument> <description> - Calls the [code]method[/code] on the object during idle time and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblock] call_deferred("set", "position", Vector2(42.0, 0.0)) [/codeblock] @@ -139,7 +145,7 @@ <argument index="4" name="flags" type="int" default="0"> </argument> <description> - Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. + Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost. Examples: @@ -148,6 +154,13 @@ connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal [/codeblock] + An example of the relationship between [code]binds[/code] passed to [method connect] and parameters used when calling [method emit_signal]: + [codeblock] + connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last + emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first + func _on_Player_hit(hit_by, level, weapon_type, damage): + print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage]) + [/codeblock] </description> </method> <method name="disconnect"> @@ -165,7 +178,7 @@ </description> </method> <method name="emit_signal" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="signal" type="String"> </argument> @@ -190,7 +203,7 @@ <argument index="0" name="property" type="String"> </argument> <description> - Returns the [Variant] value of the given [code]property[/code]. + Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code]. </description> </method> <method name="get_class" qualifiers="const"> @@ -447,6 +460,7 @@ </argument> <description> Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. + If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's [method _init] method will be called. </description> </method> <method name="to_string"> diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index f4fa6ac688..6cfef42204 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.2"> +<class name="OccluderPolygon2D" inherits="Resource" version="4.0"> <brief_description> Defines a 2D polygon for LightOccluder2D. </brief_description> diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml index 7189826385..e836dc1758 100644 --- a/doc/classes/OmniLight.xml +++ b/doc/classes/OmniLight.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="OmniLight" inherits="Light" category="Core" version="3.2"> +<class name="OmniLight" inherits="Light" version="4.0"> <brief_description> Omnidirectional light, such as a light bulb or a candle. </brief_description> @@ -33,8 +33,10 @@ Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. </constant> <constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail"> + Use more detail vertically when computing the shadow. </constant> <constant name="SHADOW_DETAIL_HORIZONTAL" value="1" enum="ShadowDetail"> + Use more detail horizontally when computing the shadow. </constant> </constants> </class> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index b3f1359e69..d488e918b9 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="OptionButton" inherits="Button" category="Core" version="3.2"> +<class name="OptionButton" inherits="Button" version="4.0"> <brief_description> Button control that provides selectable options when pressed. </brief_description> @@ -19,7 +19,7 @@ <argument index="2" name="id" type="int" default="-1"> </argument> <description> - Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end. + Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_item"> @@ -30,7 +30,7 @@ <argument index="1" name="id" type="int" default="-1"> </argument> <description> - Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end. + Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_separator"> @@ -44,14 +44,14 @@ <return type="void"> </return> <description> - Clear all the items in the [OptionButton]. + Clears all the items in the [OptionButton]. </description> </method> <method name="get_item_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the amount of items in the OptionButton. + Returns the amount of items in the OptionButton, including separators. </description> </method> <method name="get_item_icon" qualifiers="const"> @@ -87,6 +87,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID. </description> </method> <method name="get_item_text" qualifiers="const"> @@ -109,12 +110,14 @@ <return type="int"> </return> <description> + Returns the ID of the selected item, or [code]0[/code] if no item is selected. </description> </method> <method name="get_selected_metadata" qualifiers="const"> <return type="Variant"> </return> <description> + Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata]. </description> </method> <method name="is_item_disabled" qualifiers="const"> @@ -123,6 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. </description> </method> <method name="remove_item"> @@ -131,6 +135,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Removes the item at index [code]idx[/code]. </description> </method> <method name="select"> @@ -139,7 +144,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Select an item by index and make it the current item. + Selects an item by index and makes it the current item. This will work even if the item is disabled. </description> </method> <method name="set_item_disabled"> @@ -150,6 +155,8 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> + Sets whether the item at index [code]idx[/code] is disabled. + Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected. </description> </method> <method name="set_item_icon"> @@ -160,7 +167,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Sets the icon of an item at index [code]idx[/code]. + Sets the icon of the item at index [code]idx[/code]. </description> </method> <method name="set_item_id"> @@ -171,7 +178,7 @@ <argument index="1" name="id" type="int"> </argument> <description> - Sets the ID of an item at index [code]idx[/code]. + Sets the ID of the item at index [code]idx[/code]. </description> </method> <method name="set_item_metadata"> @@ -182,6 +189,7 @@ <argument index="1" name="metadata" type="Variant"> </argument> <description> + Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID. </description> </method> <method name="set_item_text"> @@ -192,7 +200,7 @@ <argument index="1" name="text" type="String"> </argument> <description> - Sets the text of an item at index [code]idx[/code]. + Sets the text of the item at index [code]idx[/code]. </description> </method> </methods> @@ -200,6 +208,7 @@ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" /> <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" /> <member name="selected" type="int" setter="_select_int" getter="get_selected" default="-1"> + The index of the currently selected item, or [code]-1[/code] if no item is selected. </member> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" /> </members> @@ -223,30 +232,43 @@ </constants> <theme_items> <theme_item name="arrow" type="Texture"> + The arrow icon to be drawn on the right end of the button. </theme_item> <theme_item name="arrow_margin" type="int" default="2"> + The horizontal space between the arrow icon and the right edge of the button. </theme_item> <theme_item name="disabled" type="StyleBox"> + [StyleBox] used when the [OptionButton] is disabled. </theme_item> <theme_item name="focus" type="StyleBox"> + [StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> <theme_item name="font" type="Font"> + [Font] of the [OptionButton]'s text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default text [Color] of the [OptionButton]. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + Text [Color] used when the [OptionButton] is disabled. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Text [Color] used when the [OptionButton] is being hovered. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [OptionButton] is being pressed. </theme_item> <theme_item name="hover" type="StyleBox"> + [StyleBox] used when the [OptionButton] is being hovered. </theme_item> <theme_item name="hseparation" type="int" default="2"> + The horizontal space between [OptionButton]'s icon and text. </theme_item> <theme_item name="normal" type="StyleBox"> + Default [StyleBox] for the [OptionButton]. </theme_item> <theme_item name="pressed" type="StyleBox"> + [StyleBox] used when the [OptionButton] is being pressed. </theme_item> </theme_items> </class> diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index ff45ca925c..314869be49 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PCKPacker" inherits="Reference" category="Core" version="3.2"> +<class name="PCKPacker" inherits="Reference" version="4.0"> <brief_description> + Creates packages that can be loaded into a running project. </brief_description> <description> - The [PCKPacker] is used to create packages in application runtime. + The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack]. [codeblock] var packer = PCKPacker.new() - packer.pck_start("test.pck", 0) + packer.pck_start("test.pck") packer.add_file("res://text.txt", "text.txt") - packer.flush(false) + packer.flush() [/codeblock] - The above [PCKPacker] creates package [b]test.pck[/b], then adds a file named [b]text.txt[/b] in the root of the package. + The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package. </description> <tutorials> </tutorials> @@ -29,9 +30,10 @@ <method name="flush"> <return type="int" enum="Error"> </return> - <argument index="0" name="verbose" type="bool"> + <argument index="0" name="verbose" type="bool" default="false"> </argument> <description> + Writes the files specified using all [method add_file] calls since the last flush. If [code]verbose[/code] is [code]true[/code], a list of files added will be printed to the console for easier debugging. </description> </method> <method name="pck_start"> @@ -39,9 +41,10 @@ </return> <argument index="0" name="pck_name" type="String"> </argument> - <argument index="1" name="alignment" type="int"> + <argument index="1" name="alignment" type="int" default="0"> </argument> <description> + Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required). </description> </method> </methods> diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/PHashTranslation.xml index 7c771b6b04..30194e9495 100644 --- a/doc/classes/PHashTranslation.xml +++ b/doc/classes/PHashTranslation.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PHashTranslation" inherits="Translation" category="Core" version="3.2"> +<class name="PHashTranslation" inherits="Translation" version="4.0"> <brief_description> Optimized translation. </brief_description> diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml index fa6a00d65d..79c9fa8d9c 100644 --- a/doc/classes/PackedDataContainer.xml +++ b/doc/classes/PackedDataContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PackedDataContainer" inherits="Resource" category="Core" version="3.2"> +<class name="PackedDataContainer" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml index 8623ff7843..9e7ed59054 100644 --- a/doc/classes/PackedDataContainerRef.xml +++ b/doc/classes/PackedDataContainerRef.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PackedDataContainerRef" inherits="Reference" category="Core" version="3.2"> +<class name="PackedDataContainerRef" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 0400f2704b..d13195bd5e 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PackedScene" inherits="Resource" category="Core" version="3.2"> +<class name="PackedScene" inherits="Resource" version="4.0"> <brief_description> An abstraction of a serialized scene. </brief_description> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index d52bf4e3bb..39da9d1548 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PacketPeer" inherits="Reference" category="Core" version="3.2"> +<class name="PacketPeer" inherits="Reference" version="4.0"> <brief_description> Abstraction and base class for packet-based protocols. </brief_description> @@ -67,6 +67,10 @@ If [code]true[/code], the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var]. [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="encode_buffer_max_size" type="int" setter="set_encode_buffer_max_size" getter="get_encode_buffer_max_size" default="8388608"> + Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations. + The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [code]encode_buffer_max_size[/code], the method will error out with [constant ERR_OUT_OF_MEMORY]. + </member> </members> <constants> </constants> diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml index 0376fea592..ec1ee175f7 100644 --- a/doc/classes/PacketPeerStream.xml +++ b/doc/classes/PacketPeerStream.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PacketPeerStream" inherits="PacketPeer" category="Core" version="3.2"> +<class name="PacketPeerStream" inherits="PacketPeer" version="4.0"> <brief_description> Wrapper to use a PacketPeer over a StreamPeer. </brief_description> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 260dbae8e2..81cd341ef7 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PacketPeerUDP" inherits="PacketPeer" category="Core" version="3.2"> +<class name="PacketPeerUDP" inherits="PacketPeer" version="4.0"> <brief_description> UDP packet peer. </brief_description> @@ -47,6 +47,7 @@ <description> Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code]. You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. + Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work. </description> </method> <method name="leave_multicast_group"> @@ -76,6 +77,16 @@ If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). </description> </method> + <method name="set_broadcast_enabled"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + Enable or disable sending of broadcast packets (e.g. [code]set_dest_address("255.255.255.255", 4343)[/code]. This option is disabled by default. + Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too. + </description> + </method> <method name="set_dest_address"> <return type="int" enum="Error"> </return> @@ -85,6 +96,7 @@ </argument> <description> Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. + Note: [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]). </description> </method> <method name="wait"> diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index c9c3f80e7b..a96871ba28 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Panel" inherits="Control" category="Core" version="3.2"> +<class name="Panel" inherits="Control" version="4.0"> <brief_description> Provides an opaque background for [Control] children. </brief_description> diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml index 64fae6d95c..9803a8dc51 100644 --- a/doc/classes/PanelContainer.xml +++ b/doc/classes/PanelContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PanelContainer" inherits="Container" category="Core" version="3.2"> +<class name="PanelContainer" inherits="Container" version="4.0"> <brief_description> Panel container type. </brief_description> @@ -10,6 +10,9 @@ </tutorials> <methods> </methods> + <members> + <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" /> + </members> <constants> </constants> <theme_items> diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml index 96aefc0623..c1c048f875 100644 --- a/doc/classes/PanoramaSky.xml +++ b/doc/classes/PanoramaSky.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PanoramaSky" inherits="Sky" category="Core" version="3.2"> +<class name="PanoramaSky" inherits="Sky" version="4.0"> <brief_description> A type of [Sky] used to draw a background texture. </brief_description> diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index d4f3462016..3b730fc4d4 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ParallaxBackground" inherits="CanvasLayer" category="Core" version="3.2"> +<class name="ParallaxBackground" inherits="CanvasLayer" version="4.0"> <brief_description> A node used to create a parallax scrolling background. </brief_description> diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml index 75c69cc4b1..105d105731 100644 --- a/doc/classes/ParallaxLayer.xml +++ b/doc/classes/ParallaxLayer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.2"> +<class name="ParallaxLayer" inherits="Node2D" version="4.0"> <brief_description> A parallax scrolling layer to be used with [ParallaxBackground]. </brief_description> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 7bfea8bce4..b146678bfc 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Particles" inherits="GeometryInstance" category="Core" version="3.2"> +<class name="Particles" inherits="GeometryInstance" version="4.0"> <brief_description> 3D particle emitter. </brief_description> @@ -8,7 +8,7 @@ Use the [code]process_material[/code] property to add a [ParticlesMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link> </tutorials> <methods> <method name="capture_aabb" qualifiers="const"> @@ -51,7 +51,7 @@ Number of particles to emit. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder" default="0"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh"> [Mesh] that is drawn for the first draw pass. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index 7c7b42ce88..2a00ec3113 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Particles2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Particles2D" inherits="Node2D" version="4.0"> <brief_description> 2D particle emitter. </brief_description> @@ -31,7 +31,7 @@ Number of particles emitted in one emission cycle. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> If [code]true[/code], particles are being emitted. diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 64751cdf76..42f0fe1f00 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ParticlesMaterial" inherits="Material" category="Core" version="3.2"> +<class name="ParticlesMaterial" inherits="Material" version="4.0"> <brief_description> Particle properties for [Particles] and [Particles2D] nodes. </brief_description> @@ -17,6 +17,7 @@ <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags"> </argument> <description> + Returns [code]true[/code] if the specified flag is enabled. </description> </method> <method name="get_param" qualifiers="const"> @@ -25,6 +26,7 @@ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> </argument> <description> + Returns the value of the specified parameter. </description> </method> <method name="get_param_randomness" qualifiers="const"> @@ -33,6 +35,7 @@ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> </argument> <description> + Returns the randomness ratio associated with the specified parameter. </description> </method> <method name="get_param_texture" qualifiers="const"> @@ -41,6 +44,7 @@ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> </argument> <description> + Returns the [Texture] used by the specified parameter. </description> </method> <method name="set_flag"> @@ -51,6 +55,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], enables the specified flag. See [enum Flags] for options. </description> </method> <method name="set_param"> @@ -61,6 +66,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the specified [enum Parameter]. </description> </method> <method name="set_param_randomness"> @@ -71,6 +77,7 @@ <argument index="1" name="randomness" type="float"> </argument> <description> + Sets the randomness ratio for the specified [enum Parameter]. </description> </method> <method name="set_param_texture"> @@ -81,6 +88,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets the [Texture] for the specified [enum Parameter]. </description> </method> </methods> @@ -157,7 +165,7 @@ Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0"> - Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. + Particles will be emitted inside this region. Use [enum EmissionShape] constants for values. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE]. @@ -321,5 +329,8 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture]. </constant> + <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + Represents the size of the [enum EmissionShape] enum. + </constant> </constants> </class> diff --git a/doc/classes/Path.xml b/doc/classes/Path.xml index 12ae8fd3d5..801e86ff9e 100644 --- a/doc/classes/Path.xml +++ b/doc/classes/Path.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Path" inherits="Spatial" category="Core" version="3.2"> +<class name="Path" inherits="Spatial" version="4.0"> <brief_description> Contains a [Curve3D] path for [PathFollow] nodes to follow. </brief_description> diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml index 7b37f8e40d..ab266a2f73 100644 --- a/doc/classes/Path2D.xml +++ b/doc/classes/Path2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Path2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Path2D" inherits="Node2D" version="4.0"> <brief_description> Contains a [Curve2D] path for [PathFollow2D] nodes to follow. </brief_description> diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml index 0b4a781a7e..85ca5b787f 100644 --- a/doc/classes/PathFollow.xml +++ b/doc/classes/PathFollow.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PathFollow" inherits="Spatial" category="Core" version="3.2"> +<class name="PathFollow" inherits="Spatial" version="4.0"> <brief_description> Point sampler for a [Path]. </brief_description> diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml index 9c4624dfee..bbaeca12da 100644 --- a/doc/classes/PathFollow2D.xml +++ b/doc/classes/PathFollow2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PathFollow2D" inherits="Node2D" category="Core" version="3.2"> +<class name="PathFollow2D" inherits="Node2D" version="4.0"> <brief_description> Point sampler for a [Path2D]. </brief_description> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index a2b5856624..e992f25836 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Performance" inherits="Object" category="Core" version="3.2"> +<class name="Performance" inherits="Object" version="4.0"> <brief_description> Exposes performance-related data. </brief_description> diff --git a/doc/classes/PhysicalBone.xml b/doc/classes/PhysicalBone.xml index 583c24e2c0..cef41aac5c 100644 --- a/doc/classes/PhysicalBone.xml +++ b/doc/classes/PhysicalBone.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicalBone" inherits="PhysicsBody" category="Core" version="3.2"> +<class name="PhysicalBone" inherits="PhysicsBody" version="4.0"> <brief_description> </brief_description> <description> @@ -7,6 +7,24 @@ <tutorials> </tutorials> <methods> + <method name="apply_central_impulse"> + <return type="void"> + </return> + <argument index="0" name="impulse" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="apply_impulse"> + <return type="void"> + </return> + <argument index="0" name="position" type="Vector3"> + </argument> + <argument index="1" name="impulse" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="get_bone_id" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml index af3bba9b86..d9d402ac9a 100644 --- a/doc/classes/Physics2DDirectBodyState.xml +++ b/doc/classes/Physics2DDirectBodyState.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DDirectBodyState" inherits="Object" category="Core" version="3.2"> +<class name="Physics2DDirectBodyState" inherits="Object" version="4.0"> <brief_description> Direct access object to a physics body in the [Physics2DServer]. </brief_description> diff --git a/doc/classes/Physics2DDirectBodyStateSW.xml b/doc/classes/Physics2DDirectBodyStateSW.xml index 8aeea560c3..11f1140ca8 100644 --- a/doc/classes/Physics2DDirectBodyStateSW.xml +++ b/doc/classes/Physics2DDirectBodyStateSW.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" category="Core" version="3.2"> +<class name="Physics2DDirectBodyStateSW" inherits="Physics2DDirectBodyState" version="4.0"> <brief_description> Software implementation of [Physics2DDirectBodyState]. </brief_description> diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml index e11e8918cd..662a823d84 100644 --- a/doc/classes/Physics2DDirectSpaceState.xml +++ b/doc/classes/Physics2DDirectSpaceState.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DDirectSpaceState" inherits="Object" category="Core" version="3.2"> +<class name="Physics2DDirectSpaceState" inherits="Object" version="4.0"> <brief_description> Direct access object to a space in the [Physics2DServer]. </brief_description> diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index a139fa4664..4fac27a82b 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DServer" inherits="Object" category="Core" version="3.2"> +<class name="Physics2DServer" inherits="Object" version="4.0"> <brief_description> Server interface for low-level 2D physics access. </brief_description> @@ -203,7 +203,7 @@ </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: - 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. 2: [RID] of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. 4: The shape index of the object that entered/exited the area. @@ -1155,7 +1155,7 @@ Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. </constant> <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter"> - This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. </constant> <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter"> Constant to set/get the linear dampening factor of an area. diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml index e478a33e2c..1e4531ed66 100644 --- a/doc/classes/Physics2DServerSW.xml +++ b/doc/classes/Physics2DServerSW.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DServerSW" inherits="Physics2DServer" category="Core" version="3.2"> +<class name="Physics2DServerSW" inherits="Physics2DServer" version="4.0"> <brief_description> Software implementation of [Physics2DServer]. </brief_description> diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml index 7d46dd2876..392ccbd10a 100644 --- a/doc/classes/Physics2DShapeQueryParameters.xml +++ b/doc/classes/Physics2DShapeQueryParameters.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.2"> +<class name="Physics2DShapeQueryParameters" inherits="Reference" version="4.0"> <brief_description> Parameters to be sent to a 2D shape physics query. </brief_description> <description> - This class contains the shape and other parameters for intersection/collision queries. + This class contains the shape and other parameters for 2D intersection/collision queries. See also [Physics2DShapeQueryResult]. </description> <tutorials> </tutorials> @@ -21,14 +21,16 @@ </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], the query will take [Area2D]s into account. </member> <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> + If [code]true[/code], the query will take [PhysicsBody2D]s into account. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647"> - The physics layer the query should be made on. + The physics layer(s) the query will take into account (as a bitmask). </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> - The list of objects or object [RID]s, that will be excluded from collisions. + The list of objects or object [RID]s that will be excluded from collisions. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The collision margin for the shape. @@ -37,10 +39,10 @@ The motion of the shape being queried for. </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> - The [RID] of the queried shape. See also [method set_shape]. + The queried shape's [RID]. See also [method set_shape]. </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> - the transform matrix of the queried shape. + The queried shape's transform matrix. </member> </members> <constants> diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml index dd38b488f5..359a716bee 100644 --- a/doc/classes/Physics2DShapeQueryResult.xml +++ b/doc/classes/Physics2DShapeQueryResult.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.2"> +<class name="Physics2DShapeQueryResult" inherits="Reference" version="4.0"> <brief_description> + Result of a 2D shape query in [Physics2DServer]. </brief_description> <description> + The result of a 2D shape query in [Physics2DServer]. See also [Physics2DShapeQueryParameters]. </description> <tutorials> </tutorials> @@ -11,6 +13,7 @@ <return type="int"> </return> <description> + Returns the number of objects that intersected with the shape. </description> </method> <method name="get_result_object" qualifiers="const"> @@ -19,6 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_id" qualifiers="const"> @@ -27,6 +31,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_shape" qualifiers="const"> @@ -35,6 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_rid" qualifiers="const"> @@ -43,6 +49,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. </description> </method> </methods> diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml index 752b50922d..9e8c03580f 100644 --- a/doc/classes/Physics2DTestMotionResult.xml +++ b/doc/classes/Physics2DTestMotionResult.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Physics2DTestMotionResult" inherits="Reference" category="Core" version="3.2"> +<class name="Physics2DTestMotionResult" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml index ee50f5a6c3..c0927a5b53 100644 --- a/doc/classes/PhysicsBody.xml +++ b/doc/classes/PhysicsBody.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsBody" inherits="CollisionObject" category="Core" version="3.2"> +<class name="PhysicsBody" inherits="CollisionObject" version="4.0"> <brief_description> Base class for all objects affected by physics in 3D space. </brief_description> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 4fe7c329bd..28d6ce7048 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsBody2D" inherits="CollisionObject2D" category="Core" version="3.2"> +<class name="PhysicsBody2D" inherits="CollisionObject2D" version="4.0"> <brief_description> Base class for all objects affected by physics in 2D space. </brief_description> diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index e68d280cd1..24cf4961be 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsDirectBodyState" inherits="Object" category="Core" version="3.2"> +<class name="PhysicsDirectBodyState" inherits="Object" version="4.0"> <brief_description> Direct access object to a physics body in the [PhysicsServer]. </brief_description> diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index 1a3324bf0e..a6172805e9 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.2"> +<class name="PhysicsDirectSpaceState" inherits="Object" version="4.0"> <brief_description> Direct access object to a space in the [PhysicsServer]. </brief_description> diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml index 73f1416172..84e7f2b275 100644 --- a/doc/classes/PhysicsMaterial.xml +++ b/doc/classes/PhysicsMaterial.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsMaterial" inherits="Resource" category="Core" version="3.2"> +<class name="PhysicsMaterial" inherits="Resource" version="4.0"> <brief_description> A material for physics properties. </brief_description> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index a779a34e6a..d54a907d3d 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsServer" inherits="Object" category="Core" version="3.2"> +<class name="PhysicsServer" inherits="Object" version="4.0"> <brief_description> Server interface for low-level physics access. </brief_description> @@ -68,7 +68,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter"> </argument> <description> - Returns an area parameter value. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. + Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants. </description> </method> <method name="area_get_shape" qualifiers="const"> @@ -194,7 +194,7 @@ </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: - 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. 2: [RID] of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. 4: The shape index of the object that entered/exited the area. @@ -221,7 +221,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets the value for an area parameter. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. + Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants. </description> </method> <method name="area_set_ray_pickable"> @@ -292,7 +292,7 @@ <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode"> </argument> <description> - Sets the space override mode for the area. The modes are described in the constants [code]AREA_SPACE_OVERRIDE_*[/code]. + Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants. </description> </method> <method name="area_set_transform"> @@ -426,7 +426,7 @@ <argument index="1" name="init_sleeping" type="bool" default="false"> </argument> <description> - Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. + Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. </description> </method> <method name="body_get_collision_layer" qualifiers="const"> @@ -500,7 +500,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter"> </argument> <description> - Returns the value of a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. + Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> </method> <method name="body_get_shape" qualifiers="const"> @@ -715,7 +715,7 @@ <argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode"> </argument> <description> - Sets the body mode, from one of the constants BODY_MODE*. + Sets the body mode, from one of the [enum BodyMode] constants. </description> </method> <method name="body_set_omit_force_integration"> @@ -739,7 +739,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. + Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> </method> <method name="body_set_ray_pickable"> @@ -812,7 +812,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets a body state (see BODY_STATE* constants). + Sets a body state (see [enum BodyState] constants). </description> </method> <method name="cone_twist_joint_get_param" qualifiers="const"> @@ -823,7 +823,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam"> </argument> <description> - Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). + Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="cone_twist_joint_set_param"> @@ -836,7 +836,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). + Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="free_rid"> @@ -858,7 +858,7 @@ <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag"> </argument> <description> - Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). + Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_get_param"> @@ -871,7 +871,7 @@ <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam"> </argument> <description> - Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). + Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="generic_6dof_joint_set_flag"> @@ -886,7 +886,7 @@ <argument index="3" name="enable" type="bool"> </argument> <description> - Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). + Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_set_param"> @@ -901,7 +901,7 @@ <argument index="3" name="value" type="float"> </argument> <description> - Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). + Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="get_process_info"> @@ -921,7 +921,7 @@ <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag"> </argument> <description> - Gets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). + Gets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_get_param" qualifiers="const"> @@ -932,7 +932,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam"> </argument> <description> - Gets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). + Gets a hinge_joint parameter (see [enum HingeJointParam]). </description> </method> <method name="hinge_joint_set_flag"> @@ -945,7 +945,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> - Sets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). + Sets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_set_param"> @@ -958,7 +958,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). + Sets a hinge_joint parameter (see [enum HingeJointParam] constants). </description> </method> <method name="joint_create_cone_twist"> @@ -1091,7 +1091,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam"> </argument> <description> - Gets a pin_joint parameter (see PIN_JOINT* constants). + Gets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="pin_joint_set_local_a"> @@ -1126,7 +1126,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a pin_joint parameter (see PIN_JOINT* constants). + Sets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="set_active"> @@ -1144,7 +1144,7 @@ <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType"> </argument> <description> - Creates a shape of type [code]SHAPE_*[/code]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. </description> </method> <method name="shape_get_data" qualifiers="const"> @@ -1162,7 +1162,7 @@ <argument index="0" name="shape" type="RID"> </argument> <description> - Returns the type of shape (see [code]SHAPE_*[/code] constants). + Returns the type of shape (see [enum ShapeType] constants). </description> </method> <method name="shape_set_data"> @@ -1184,7 +1184,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam"> </argument> <description> - Gets a slider_joint parameter (see SLIDER_JOINT* constants). + Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="slider_joint_set_param"> @@ -1197,7 +1197,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Gets a slider_joint parameter (see SLIDER_JOINT* constants). + Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="space_create"> @@ -1257,7 +1257,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets the value for a space parameter. A list of available parameters is on the [code]SPACE_PARAM_*[/code] constants. + Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. </description> </method> </methods> @@ -1315,7 +1315,7 @@ If [code]true[/code], the Hinge has a maximum and a minimum rotation. </constant> <constant name="HINGE_JOINT_FLAG_ENABLE_MOTOR" value="1" enum="HingeJointFlag"> - If [code]true[/code], a motor turns the Hinge + If [code]true[/code], a motor turns the Hinge. </constant> <constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0" enum="SliderJointParam"> The maximum difference between the pivot points on their X axis before damping happens. @@ -1509,7 +1509,7 @@ Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. </constant> <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter"> - This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. </constant> <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter"> Constant to set/get the linear dampening factor of an area. diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml index 7d7307592e..829a1d1bf0 100644 --- a/doc/classes/PhysicsShapeQueryParameters.xml +++ b/doc/classes/PhysicsShapeQueryParameters.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.2"> +<class name="PhysicsShapeQueryParameters" inherits="Reference" version="4.0"> <brief_description> + Parameters to be sent to a 3D shape physics query. </brief_description> <description> + This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult]. </description> <tutorials> </tutorials> @@ -13,23 +15,31 @@ <argument index="0" name="shape" type="Resource"> </argument> <description> + Sets the [Shape] that will be used for collision/intersection queries. </description> </method> </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], the query will take [Area]s into account. </member> <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> + If [code]true[/code], the query will take [PhysicsBody]s into account. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> + The physics layer(s) the query will take into account (as a bitmask). </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> + The list of objects or object [RID]s that will be excluded from collisions. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> + The collision margin for the shape. </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> + The queried shape's [RID]. See also [method set_shape]. </member> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + The queried shape's transform matrix. </member> </members> <constants> diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml index 92a4393979..ea6dc2c39e 100644 --- a/doc/classes/PhysicsShapeQueryResult.xml +++ b/doc/classes/PhysicsShapeQueryResult.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.2"> +<class name="PhysicsShapeQueryResult" inherits="Reference" version="4.0"> <brief_description> - Result of a shape query in Physics2DServer. + Result of a 3D shape query in [PhysicsServer]. </brief_description> <description> + The result of a 3D shape query in [PhysicsServer]. See also [PhysicsShapeQueryParameters]. </description> <tutorials> </tutorials> @@ -12,6 +13,7 @@ <return type="int"> </return> <description> + Returns the number of objects that intersected with the shape. </description> </method> <method name="get_result_object" qualifiers="const"> @@ -20,6 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_id" qualifiers="const"> @@ -28,6 +31,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_shape" qualifiers="const"> @@ -36,6 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_rid" qualifiers="const"> @@ -44,6 +49,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. </description> </method> </methods> diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml index 647a59feef..de4cb9d98a 100644 --- a/doc/classes/PinJoint.xml +++ b/doc/classes/PinJoint.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PinJoint" inherits="Joint" category="Core" version="3.2"> +<class name="PinJoint" inherits="Joint" version="4.0"> <brief_description> Pin joint for 3D shapes. </brief_description> diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml index f65cb86b1c..020babdf40 100644 --- a/doc/classes/PinJoint2D.xml +++ b/doc/classes/PinJoint2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.2"> +<class name="PinJoint2D" inherits="Joint2D" version="4.0"> <brief_description> Pin Joint for 2D shapes. </brief_description> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index bb72f2734e..8f0043fb86 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Plane" category="Built-In Types" version="3.2"> +<class name="Plane" version="4.0"> <brief_description> Plane in hessian form. </brief_description> @@ -22,7 +22,7 @@ <argument index="3" name="d" type="float"> </argument> <description> - Creates a plane from the four parameters [code]a[/code], [code]b[/code], [code]c[/code] and [code]d[/code]. + Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin. </description> </method> <method name="Plane"> @@ -35,7 +35,7 @@ <argument index="2" name="v3" type="Vector3"> </argument> <description> - Creates a plane from three points. + Creates a plane from the three points, given in clockwise order. </description> </method> <method name="Plane"> @@ -122,6 +122,7 @@ <argument index="0" name="plane" type="Plane"> </argument> <description> + Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_point_over"> @@ -152,22 +153,30 @@ </methods> <members> <member name="d" type="float" setter="" getter="" default="0.0"> + Distance from the origin to the plane, in the direction of [member normal]. </member> <member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + The normal of the plane. "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. </member> <member name="x" type="float" setter="" getter="" default="0.0"> + The [member normal]'s X component. </member> <member name="y" type="float" setter="" getter="" default="0.0"> + The [member normal]'s Y component. </member> <member name="z" type="float" setter="" getter="" default="0.0"> + The [member normal]'s Z component. </member> </members> <constants> <constant name="PLANE_YZ" value="Plane( 1, 0, 0, 0 )"> + A plane that extends in the Y and Z axes. </constant> <constant name="PLANE_XZ" value="Plane( 0, 1, 0, 0 )"> + A plane that extends in the X and Z axes. </constant> <constant name="PLANE_XY" value="Plane( 0, 0, 1, 0 )"> + A plane that extends in the X and Y axes. </constant> </constants> </class> diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml index 01aee93dad..2081442e04 100644 --- a/doc/classes/PlaneMesh.xml +++ b/doc/classes/PlaneMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PlaneMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="PlaneMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Class representing a planar [PrimitiveMesh]. </brief_description> diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml index b94bb8e613..b40e133d00 100644 --- a/doc/classes/PlaneShape.xml +++ b/doc/classes/PlaneShape.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PlaneShape" inherits="Shape" category="Core" version="3.2"> +<class name="PlaneShape" inherits="Shape" version="4.0"> <brief_description> + Infinite plane shape for 3D collisions. </brief_description> <description> + An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [PlaneShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )"> + The [Plane] used by the [PlaneShape] for collision. </member> </members> <constants> diff --git a/doc/classes/PointMesh.xml b/doc/classes/PointMesh.xml index dc7dd065cf..af100d5206 100644 --- a/doc/classes/PointMesh.xml +++ b/doc/classes/PointMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PointMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="PointMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Mesh with a single Point primitive. </brief_description> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 7c2aa468ab..e911ed7664 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Polygon2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Polygon2D" inherits="Node2D" version="4.0"> <brief_description> A 2D polygon. </brief_description> <description> A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. + [b]Note:[/b] By default, Godot can only draw up to 4,096 polygon points at a time. To increase this limit, open the Project Settings and increase [member ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb] and [member ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb]. </description> <tutorials> </tutorials> diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml index 7286857b51..28a0447f3d 100644 --- a/doc/classes/PolygonPathFinder.xml +++ b/doc/classes/PolygonPathFinder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PolygonPathFinder" inherits="Resource" category="Core" version="3.2"> +<class name="PolygonPathFinder" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml index 867f042cd2..63a7037fb1 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PoolByteArray.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolByteArray" category="Built-In Types" version="3.2"> +<class name="PoolByteArray" version="4.0"> <brief_description> A pooled [Array] of bytes. </brief_description> @@ -78,6 +78,11 @@ <return type="String"> </return> <description> + Returns a hexadecimal representation of this array as a [String]. + [codeblock] + var array = PoolByteArray([11, 46, 255]) + print(array.hex_encode()) # Prints: 0b2eff + [/codeblock] </description> </method> <method name="insert"> diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml index 34cfa0ab53..d5599f821c 100644 --- a/doc/classes/PoolColorArray.xml +++ b/doc/classes/PoolColorArray.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolColorArray" category="Built-In Types" version="3.2"> +<class name="PoolColorArray" version="4.0"> <brief_description> A pooled [Array] of [Color]. </brief_description> diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml index 25e1e718f7..54f0f46e11 100644 --- a/doc/classes/PoolIntArray.xml +++ b/doc/classes/PoolIntArray.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolIntArray" category="Built-In Types" version="3.2"> +<class name="PoolIntArray" version="4.0"> <brief_description> A pooled [Array] of integers ([int]). </brief_description> diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml index e8afe46640..6957e7282b 100644 --- a/doc/classes/PoolRealArray.xml +++ b/doc/classes/PoolRealArray.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolRealArray" category="Built-In Types" version="3.2"> +<class name="PoolRealArray" version="4.0"> <brief_description> A pooled [Array] of reals ([float]). </brief_description> diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml index f41a3c7a68..b4fb7b31d4 100644 --- a/doc/classes/PoolStringArray.xml +++ b/doc/classes/PoolStringArray.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolStringArray" category="Built-In Types" version="3.2"> +<class name="PoolStringArray" version="4.0"> <brief_description> A pooled [Array] of [String]. </brief_description> diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml index 321846d08b..cb4536be5b 100644 --- a/doc/classes/PoolVector2Array.xml +++ b/doc/classes/PoolVector2Array.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolVector2Array" category="Built-In Types" version="3.2"> +<class name="PoolVector2Array" version="4.0"> <brief_description> A pooled [Array] of [Vector2]. </brief_description> diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml index c82bd62a11..6c40de9bd8 100644 --- a/doc/classes/PoolVector3Array.xml +++ b/doc/classes/PoolVector3Array.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PoolVector3Array" category="Built-In Types" version="3.2"> +<class name="PoolVector3Array" version="4.0"> <brief_description> A pooled [Array] of [Vector3]. </brief_description> diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index 2357ee2469..483e262f60 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Popup" inherits="Control" category="Core" version="3.2"> +<class name="Popup" inherits="Control" version="4.0"> <brief_description> Base container control for popups and dialogs. </brief_description> <description> - Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. + Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport. </description> <tutorials> </tutorials> diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml index 939453b977..a8fd9c1b7d 100644 --- a/doc/classes/PopupDialog.xml +++ b/doc/classes/PopupDialog.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PopupDialog" inherits="Popup" category="Core" version="3.2"> +<class name="PopupDialog" inherits="Popup" version="4.0"> <brief_description> Base class for popup dialogs. </brief_description> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index bdb6ca84ee..31ab27628a 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PopupMenu" inherits="Popup" category="Core" version="3.2"> +<class name="PopupMenu" inherits="Popup" version="4.0"> <brief_description> PopupMenu displays a list of options. </brief_description> @@ -334,7 +334,7 @@ <return type="bool"> </return> <description> - Returns whether the popup will be hidden when the window loses focus or not. + Returns [code]true[/code] if the popup will be hidden when the window loses focus or not. </description> </method> <method name="is_item_checkable" qualifiers="const"> @@ -391,7 +391,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the shortcut of the specified item [code]idx[/code] is disabled or not. + Returns [code]true[/code] if the specified item's shortcut is disabled. </description> </method> <method name="remove_item"> @@ -477,7 +477,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - Sets whether the item at index [code]idx[/code] is disabled or not. When it is disabled, it can't be selected and its action can't be invoked. + Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked. </description> </method> <method name="set_item_icon"> @@ -521,6 +521,7 @@ <argument index="1" name="state" type="int"> </argument> <description> + Sets the state of an multistate item. See [method add_multistate_item] for details. </description> </method> <method name="set_item_shortcut"> @@ -595,6 +596,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Cycle to the next state of an multistate item. See [method add_multistate_item] for details. </description> </method> </methods> @@ -643,55 +645,58 @@ </constants> <theme_items> <theme_item name="checked" type="Texture"> - Sets a custom [Texture] icon for [code]checked[/code] state of checkbox items. + [Texture] icon for the checked checkbox items. </theme_item> <theme_item name="font" type="Font"> - Sets a custom [Font]. + [Font] used for the menu items. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> - Sets a custom [Color] for the [Font]. + The default text [Color] for menu items' names. </theme_item> <theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )"> + The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )"> - Sets a custom [Color] for disabled text. + [Color] used for disabled menu items' text. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> - Sets a custom [Color] for the hovered text. + [Color] used for the hovered text. </theme_item> <theme_item name="hover" type="StyleBox"> - Sets a custom [StyleBox] when the [PopupMenu] is hovered. + [StyleBox] displayed when the [PopupMenu] item is hovered. </theme_item> <theme_item name="hseparation" type="int" default="4"> - Sets the horizontal space separation between each item. + The horizontal space between the item's name and the shortcut text/submenu arrow. </theme_item> <theme_item name="labeled_separator_left" type="StyleBox"> + [StyleBox] for the left side of labeled separator. See [method add_separator]. </theme_item> <theme_item name="labeled_separator_right" type="StyleBox"> + [StyleBox] for the right side of labeled separator. See [method add_separator]. </theme_item> <theme_item name="panel" type="StyleBox"> - Sets a custom [StyleBox] for the panel of the [PopupMenu]. + Default [StyleBox] of the [PopupMenu] items. </theme_item> <theme_item name="panel_disabled" type="StyleBox"> - Sets a custom [StyleBox] for the panel of the [PopupMenu], when the panel is disabled. + [StyleBox] used when the [PopupMenu] item is disabled. </theme_item> <theme_item name="radio_checked" type="Texture"> - Sets a custom [Texture] icon for [code]checked[/code] of radio button items. + [Texture] icon for the checked radio button items. </theme_item> <theme_item name="radio_unchecked" type="Texture"> - Sets a custom [Texture] icon for [code]unchecked[/code] of radio button items. + [Texture] icon for the unchecked radio button items. </theme_item> <theme_item name="separator" type="StyleBox"> - Sets a custom [StyleBox] for separator's. + [StyleBox] used for the separators. See [method add_separator]. </theme_item> <theme_item name="submenu" type="Texture"> - Sets a custom [Texture] for submenu's. + [Texture] icon for the submenu arrow. </theme_item> <theme_item name="unchecked" type="Texture"> - Sets a custom [Texture] icon for [code]unchecked[/code] of checkbox items. + [Texture] icon for the unchecked checkbox items. </theme_item> <theme_item name="vseparation" type="int" default="4"> - Sets the vertical space separation between each item. + The vertical space between each menu item. </theme_item> </theme_items> </class> diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml index bed4d97112..a3dd722f81 100644 --- a/doc/classes/PopupPanel.xml +++ b/doc/classes/PopupPanel.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PopupPanel" inherits="Popup" category="Core" version="3.2"> +<class name="PopupPanel" inherits="Popup" version="4.0"> <brief_description> Class for displaying popups with a panel background. </brief_description> diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml index ccadee6018..9fadb73a15 100644 --- a/doc/classes/Position2D.xml +++ b/doc/classes/Position2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Position2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Position2D" inherits="Node2D" version="4.0"> <brief_description> Generic 2D position hint for editing. </brief_description> diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml index 4d43a6729d..6dce8a91c6 100644 --- a/doc/classes/Position3D.xml +++ b/doc/classes/Position3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Position3D" inherits="Spatial" category="Core" version="3.2"> +<class name="Position3D" inherits="Spatial" version="4.0"> <brief_description> Generic 3D position hint for editing. </brief_description> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index b0e69bd089..ea84860632 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PrimitiveMesh" inherits="Mesh" category="Core" version="3.2"> +<class name="PrimitiveMesh" inherits="Mesh" version="4.0"> <brief_description> Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. </brief_description> @@ -22,7 +22,8 @@ Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. </member> <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false"> - If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial]. + If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. + This gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode]. </member> <member name="material" type="Material" setter="set_material" getter="get_material"> The current [Material] of the primitive mesh. diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index 1d4e5ddab7..b2e1fdd3f0 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PrismMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="PrismMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Class representing a prism-shaped [PrimitiveMesh]. </brief_description> diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml index 9ffca20081..25d09a1bc0 100644 --- a/doc/classes/ProceduralSky.xml +++ b/doc/classes/ProceduralSky.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ProceduralSky" inherits="Sky" category="Core" version="3.2"> +<class name="ProceduralSky" inherits="Sky" version="4.0"> <brief_description> Type of [Sky] that is generated procedurally based on user input parameters. </brief_description> @@ -63,14 +63,19 @@ </members> <constants> <constant name="TEXTURE_SIZE_256" value="0" enum="TextureSize"> + Sky texture will be 256x128. </constant> <constant name="TEXTURE_SIZE_512" value="1" enum="TextureSize"> + Sky texture will be 512x256. </constant> <constant name="TEXTURE_SIZE_1024" value="2" enum="TextureSize"> + Sky texture will be 1024x512. This is the default size. </constant> <constant name="TEXTURE_SIZE_2048" value="3" enum="TextureSize"> + Sky texture will be 2048x1024. </constant> <constant name="TEXTURE_SIZE_4096" value="4" enum="TextureSize"> + Sky texture will be 4096x2048. </constant> <constant name="TEXTURE_SIZE_MAX" value="5" enum="TextureSize"> Represents the size of the [enum TextureSize] enum. diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index d489fd8bca..e94299a5b8 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ProgressBar" inherits="Range" category="Core" version="3.2"> +<class name="ProgressBar" inherits="Range" version="4.0"> <brief_description> General-purpose progress bar. </brief_description> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 772c2f5073..b4284e06b9 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ProjectSettings" inherits="Object" category="Core" version="3.2"> +<class name="ProjectSettings" inherits="Object" version="4.0"> <brief_description> Contains global variables accessible from everywhere. </brief_description> @@ -17,7 +17,10 @@ <argument index="0" name="hint" type="Dictionary"> </argument> <description> - Adds a custom property info to a property. The dictionary must contain: name:[String](the property's name) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + Adds a custom property info to a property. The dictionary must contain: + - [code]name[/code]: [String] (the property's name) + - [code]type[/code]: [int] (see [enum Variant.Type]) + - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] [b]Example:[/b] [codeblock] ProjectSettings.set("category/property_name", 0) @@ -202,6 +205,7 @@ Icon used for the project, set when project loads. Exporters will also use this icon when possible. </member> <member name="application/config/macos_native_icon" type="String" setter="" getter="" default=""""> + Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon]. </member> <member name="application/config/name" type="String" setter="" getter="" default=""""> The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files. @@ -214,6 +218,7 @@ If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code]. </member> <member name="application/config/windows_native_icon" type="String" setter="" getter="" default=""""> + Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon]. </member> <member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false"> If [code]true[/code], disables printing to standard error in an exported build. @@ -240,6 +245,7 @@ Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. </member> <member name="audio/default_bus_layout" type="String" setter="" getter="" default=""res://default_bus_layout.tres""> + Default [AudioBusLayout] resource file to use in the project, unless overridden by the scene. </member> <member name="audio/driver" type="String" setter="" getter="" default=""PulseAudio""> Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. @@ -269,6 +275,7 @@ Enables long-distance matching in Zstandard. </member> <member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27"> + Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. </member> <member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter="" default="false"> If [code]true[/code], displays getters and setters in autocompletion results in the script editor. This setting is meant to be used when porting old projects (Godot 2), as using member variables is the preferred style from Godot 3 onwards. @@ -318,6 +325,9 @@ <member name="debug/gdscript/warnings/standalone_expression" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. </member> + <member name="debug/gdscript/warnings/standalone_ternary" type="bool" setter="" getter="" default="true"> + If [code]true[/code], enables warnings when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement. + </member> <member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false"> If [code]true[/code], all warnings will be reported as if they were errors. </member> @@ -345,7 +355,7 @@ <member name="debug/gdscript/warnings/unused_argument" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a function parameter is unused. </member> - <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when a member variable is unused. </member> <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true"> @@ -364,6 +374,9 @@ Message to be displayed before the backtrace when the engine crashes. </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. + 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"> Maximum call stack allowed for debugging GDScript. @@ -380,6 +393,21 @@ <member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter="" default="1024"> Maximum call stack in visual scripting, to avoid infinite recursion. </member> + <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color( 1, 0.2, 0.1, 0.8 )"> + Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. + </member> + <member name="debug/shapes/collision/max_contacts_displayed" type="int" setter="" getter="" default="10000"> + Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu. + </member> + <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.5 )"> + Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. + </member> + <member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color( 1, 0.7, 0.1, 0.4 )"> + Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu. + </member> + <member name="debug/shapes/navigation/geometry_color" type="Color" setter="" getter="" default="Color( 0.1, 1, 0.7, 0.4 )"> + Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu. + </member> <member name="display/mouse_cursor/custom_image" type="String" setter="" getter="" default=""""> Custom image for the mouse cursor (limited to 256×256). </member> @@ -398,6 +426,9 @@ <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> Default orientation on mobile devices. </member> + <member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true"> + If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. + </member> <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false"> If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it. </member> @@ -431,55 +462,91 @@ <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> <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> + Search path for project-specific script templates. Script templates will be search both in the editor-specific path and in this project-specific path. </member> <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( "gd", "shader" )"> + Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. </member> <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0"> + Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden. </member> <member name="gui/common/swap_ok_cancel" type="bool" setter="" getter="" default="false"> If [code]true[/code], swaps OK and Cancel buttons in dialogs on Windows and UWP to follow interface conventions. </member> <member name="gui/theme/custom" type="String" setter="" getter="" default=""""> - Use a custom theme resource, set a path to it here. + Path to a custom [Theme] resource file to use for the project ([code]theme[/code] or generic [code]tres[/code]/[code]res[/code] extension). </member> <member name="gui/theme/custom_font" type="String" setter="" getter="" default=""""> - Use a custom default font resource, set a path to it here. + Path to a custom [Font] resource to use as default for all GUI elements of the project. </member> <member name="gui/theme/use_hidpi" type="bool" setter="" getter="" default="false"> If [code]true[/code], makes sure the theme used works with HiDPI. </member> <member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000"> - Timer setting for incremental search in Tree, IntemList, etc. controls (in milliseconds). + Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds). </member> <member name="gui/timers/text_edit_idle_detect_sec" type="float" setter="" getter="" default="3"> - Timer for detecting idle in the editor (in seconds). + Timer for detecting idle in [TextEdit] (in seconds). + </member> + <member name="gui/timers/tooltip_delay_sec" type="float" setter="" getter="" default="0.5"> + Default delay for tooltips (in seconds). </member> - <member name="input/ui_accept" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null), Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null), Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_accept" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to confirm a focused button, menu or list item, or validate input. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_cancel" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_cancel" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to discard a modal or pending input. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_down" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_down" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to move down in the UI. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_end" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_end" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to go to the end position of a [Control] (e.g. last item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_END] on typical desktop UI systems. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_focus_next" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_focus_next" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to focus the next [Control] in the scene. The focus behavior can be configured via [member Control.focus_next]. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_focus_prev" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_focus_prev" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to focus the previous [Control] in the scene. The focus behavior can be configured via [member Control.focus_previous]. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_home" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777229,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_home" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to go to the start position of a [Control] (e.g. first item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_HOME] on typical desktop UI systems. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_left" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_left" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to move left in the UI. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_page_down" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777236,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_page_down" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to go down a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEDOWN] on typical desktop UI systems. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_page_up" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777235,"unicode":0,"echo":false,"script":null) ]}"> + <member name="input/ui_page_up" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to go up a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEUP] on typical desktop UI systems. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_right" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_right" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to move right in the UI. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_select" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_select" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to select an item in a [Control] (e.g. in an [ItemList] or a [Tree]). + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> - <member name="input/ui_up" type="Dictionary" setter="" getter="" default="{"deadzone": 0.5,"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null), Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) ]}"> + <member name="input/ui_up" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to move up in the UI. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true"> If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen. @@ -488,164 +555,244 @@ If [code]true[/code], sends touch input events when clicking or dragging the mouse. </member> <member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 1. </member> <member name="layer_names/2d_physics/layer_10" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 10. </member> <member name="layer_names/2d_physics/layer_11" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 11. </member> <member name="layer_names/2d_physics/layer_12" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 12. </member> <member name="layer_names/2d_physics/layer_13" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 13. </member> <member name="layer_names/2d_physics/layer_14" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 14. </member> <member name="layer_names/2d_physics/layer_15" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 15. </member> <member name="layer_names/2d_physics/layer_16" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 16. </member> <member name="layer_names/2d_physics/layer_17" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 17. </member> <member name="layer_names/2d_physics/layer_18" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 18. </member> <member name="layer_names/2d_physics/layer_19" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 19. </member> <member name="layer_names/2d_physics/layer_2" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 2. </member> <member name="layer_names/2d_physics/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 20. </member> <member name="layer_names/2d_physics/layer_3" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 3. </member> <member name="layer_names/2d_physics/layer_4" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 4. </member> <member name="layer_names/2d_physics/layer_5" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 5. </member> <member name="layer_names/2d_physics/layer_6" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 6. </member> <member name="layer_names/2d_physics/layer_7" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 7. </member> <member name="layer_names/2d_physics/layer_8" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 8. </member> <member name="layer_names/2d_physics/layer_9" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 9. </member> <member name="layer_names/2d_render/layer_1" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 1. </member> <member name="layer_names/2d_render/layer_10" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 10. </member> <member name="layer_names/2d_render/layer_11" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 11. </member> <member name="layer_names/2d_render/layer_12" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 12. </member> <member name="layer_names/2d_render/layer_13" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 13. </member> <member name="layer_names/2d_render/layer_14" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 14. </member> <member name="layer_names/2d_render/layer_15" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 15. </member> <member name="layer_names/2d_render/layer_16" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 16. </member> <member name="layer_names/2d_render/layer_17" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 17. </member> <member name="layer_names/2d_render/layer_18" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 18. </member> <member name="layer_names/2d_render/layer_19" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 19. </member> <member name="layer_names/2d_render/layer_2" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 2. </member> <member name="layer_names/2d_render/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 20. </member> <member name="layer_names/2d_render/layer_3" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 3. </member> <member name="layer_names/2d_render/layer_4" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 4. </member> <member name="layer_names/2d_render/layer_5" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 5. </member> <member name="layer_names/2d_render/layer_6" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 6. </member> <member name="layer_names/2d_render/layer_7" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 7. </member> <member name="layer_names/2d_render/layer_8" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 8. </member> <member name="layer_names/2d_render/layer_9" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 9. </member> <member name="layer_names/3d_physics/layer_1" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 1. </member> <member name="layer_names/3d_physics/layer_10" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 10. </member> <member name="layer_names/3d_physics/layer_11" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 11. </member> <member name="layer_names/3d_physics/layer_12" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 12. </member> <member name="layer_names/3d_physics/layer_13" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 13. </member> <member name="layer_names/3d_physics/layer_14" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 14. </member> <member name="layer_names/3d_physics/layer_15" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 15. </member> <member name="layer_names/3d_physics/layer_16" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 16. </member> <member name="layer_names/3d_physics/layer_17" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 17. </member> <member name="layer_names/3d_physics/layer_18" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 18. </member> <member name="layer_names/3d_physics/layer_19" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 19. </member> <member name="layer_names/3d_physics/layer_2" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 2. </member> <member name="layer_names/3d_physics/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 20. </member> <member name="layer_names/3d_physics/layer_3" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 3. </member> <member name="layer_names/3d_physics/layer_4" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 4. </member> <member name="layer_names/3d_physics/layer_5" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 5. </member> <member name="layer_names/3d_physics/layer_6" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 6. </member> <member name="layer_names/3d_physics/layer_7" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 7. </member> <member name="layer_names/3d_physics/layer_8" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 8. </member> <member name="layer_names/3d_physics/layer_9" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 9. </member> <member name="layer_names/3d_render/layer_1" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 1. </member> <member name="layer_names/3d_render/layer_10" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 10. </member> <member name="layer_names/3d_render/layer_11" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 11. </member> <member name="layer_names/3d_render/layer_12" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 12. </member> <member name="layer_names/3d_render/layer_13" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 13. </member> <member name="layer_names/3d_render/layer_14" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 14 </member> <member name="layer_names/3d_render/layer_15" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 15. </member> <member name="layer_names/3d_render/layer_16" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 16. </member> <member name="layer_names/3d_render/layer_17" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 17. </member> <member name="layer_names/3d_render/layer_18" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 18. </member> <member name="layer_names/3d_render/layer_19" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 19. </member> <member name="layer_names/3d_render/layer_2" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 2. </member> <member name="layer_names/3d_render/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 20. </member> <member name="layer_names/3d_render/layer_3" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 3. </member> <member name="layer_names/3d_render/layer_4" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 4. </member> <member name="layer_names/3d_render/layer_5" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 5. </member> <member name="layer_names/3d_render/layer_6" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 6. </member> <member name="layer_names/3d_render/layer_7" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 7. </member> <member name="layer_names/3d_render/layer_8" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 8. </member> <member name="layer_names/3d_render/layer_9" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 9. </member> <member name="locale/fallback" type="String" setter="" getter="" default=""en""> The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used. @@ -684,24 +831,34 @@ Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped. </member> <member name="network/limits/tcp/connect_timeout_seconds" type="int" setter="" getter="" default="30"> + Timeout (in seconds) for connection attempts using TCP. </member> <member name="network/limits/webrtc/max_channel_in_buffer_kb" type="int" setter="" getter="" default="64"> + Maximum size (in kiB) for the [WebRTCDataChannel] input buffer. </member> <member name="network/limits/websocket_client/max_in_buffer_kb" type="int" setter="" getter="" default="64"> + Maximum size (in kiB) for the [WebSocketClient] input buffer. </member> <member name="network/limits/websocket_client/max_in_packets" type="int" setter="" getter="" default="1024"> + Maximum number of concurrent input packets for [WebSocketClient]. </member> <member name="network/limits/websocket_client/max_out_buffer_kb" type="int" setter="" getter="" default="64"> + Maximum size (in kiB) for the [WebSocketClient] output buffer. </member> <member name="network/limits/websocket_client/max_out_packets" type="int" setter="" getter="" default="1024"> + Maximum number of concurrent output packets for [WebSocketClient]. </member> <member name="network/limits/websocket_server/max_in_buffer_kb" type="int" setter="" getter="" default="64"> + Maximum size (in kiB) for the [WebSocketServer] input buffer. </member> <member name="network/limits/websocket_server/max_in_packets" type="int" setter="" getter="" default="1024"> + Maximum number of concurrent input packets for [WebSocketServer]. </member> <member name="network/limits/websocket_server/max_out_buffer_kb" type="int" setter="" getter="" default="64"> + Maximum size (in kiB) for the [WebSocketServer] output buffer. </member> <member name="network/limits/websocket_server/max_out_packets" type="int" setter="" getter="" default="1024"> + Maximum number of concurrent output packets for [WebSocketServer]. </member> <member name="network/remote_fs/page_read_ahead" type="int" setter="" getter="" default="4"> Amount of read ahead used by remote filesystem. Higher values decrease the effects of latency at the cost of higher bandwidth usage. @@ -710,6 +867,7 @@ Page size used by remote filesystem (in bytes). </member> <member name="network/ssl/certificates" type="String" setter="" getter="" default=""""> + CA certificates bundle to use for SSL connections. If not defined, Godot's internal CA certificates are used. </member> <member name="node/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. @@ -717,19 +875,85 @@ <member name="node/name_num_separator" type="int" setter="" getter="" default="0"> What to use to separate node name from number. This is mostly an editor setting. </member> + <member name="physics/2d/bp_hash_table_size" type="int" setter="" getter="" default="4096"> + Size of the hash table used for the broad-phase 2D hash grid algorithm. + </member> + <member name="physics/2d/cell_size" type="int" setter="" getter="" default="128"> + Cell size used for the broad-phase 2D hash grid algorithm. + </member> + <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0"> + The default angular damp in 2D. + </member> <member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98"> + The default gravity strength in 2D. + [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: + [codeblock] + # Set the default gravity strength to 98. + Physics2DServer.area_set_param(get_viewport().find_world_2d().get_space(), Physics2DServer.AREA_PARAM_GRAVITY, 98) + [/codeblock] + </member> + <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )"> + The default gravity direction in 2D. + [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: + [codeblock] + # Set the default gravity direction to `Vector2(0, 1)`. + Physics2DServer.area_set_param(get_viewport().find_world_2d().get_space(), Physics2DServer.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1)) + [/codeblock] + </member> + <member name="physics/2d/default_linear_damp" type="float" setter="" getter="" default="0.1"> + The default linear damp in 2D. + </member> + <member name="physics/2d/large_object_surface_threshold_in_cells" type="int" setter="" getter="" default="512"> + Threshold defining the surface size that constitutes a large object with regard to cells in the broad-phase 2D hash grid algorithm. </member> <member name="physics/2d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> + Sets which physics engine to use for 2D physics. + "DEFAULT" and "GodotPhysics" are the same, as there is currently no alternative 2D physics server implemented. + </member> + <member name="physics/2d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626"> + Threshold angular velocity under which a 2D physics body will be considered inactive. See [constant Physics2DServer.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD]. + </member> + <member name="physics/2d/sleep_threshold_linear" type="float" setter="" getter="" default="2.0"> + Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant Physics2DServer.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD]. </member> <member name="physics/2d/thread_model" type="int" setter="" getter="" default="1"> Sets whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process. + [b]Warning:[/b] As of Godot 3.2, there are mixed reports about the use of a Multi-Threaded thread model for physics. Be sure to assess whether it does give you extra performance and no regressions when using it. + </member> + <member name="physics/2d/time_before_sleep" type="float" setter="" getter="" default="0.5"> + Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant Physics2DServer.SPACE_PARAM_BODY_TIME_TO_SLEEP]. </member> <member name="physics/3d/active_soft_world" type="bool" setter="" getter="" default="true"> + Sets whether the 3D physics world will be created with support for [SoftBody] physics. Only applies to the Bullet physics engine. + </member> + <member name="physics/3d/default_angular_damp" type="float" setter="" getter="" default="0.1"> + The default angular damp in 3D. </member> <member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8"> + The default gravity strength in 3D. + [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: + [codeblock] + # Set the default gravity strength to 9.8. + PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY, 9.8) + [/codeblock] + </member> + <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3( 0, -1, 0 )"> + The default gravity direction in 3D. + [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: + [codeblock] + # Set the default gravity direction to `Vector3(0, -1, 0)`. + PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0)) + [/codeblock] + </member> + <member name="physics/3d/default_linear_damp" type="float" setter="" getter="" default="0.1"> + The default linear damp in 3D. </member> <member name="physics/3d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> - Sets which physics engine to use. + Sets which physics engine to use for 3D physics. + "DEFAULT" is currently the [url=https://bulletphysics.org]Bullet[/url] physics engine. The "GodotPhysics" engine is still supported as an alternative. + </member> + <member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true"> + Enables [member Viewport.physics_object_picking] on the root viewport. </member> <member name="physics/common/physics_fps" type="int" setter="" getter="" default="60"> Frames per second used in the physics. Physics always needs a fixed amount of frames per second. @@ -740,6 +964,9 @@ <member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )"> Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color]. </member> + <member name="rendering/environment/default_environment" type="String" setter="" getter="" default=""""> + [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. + </member> <member name="rendering/limits/buffers/blend_shape_max_buffer_size_kb" type="int" setter="" getter="" default="4096"> Max buffer size for blend shapes. Any blend shape bigger than this will not work. </member> @@ -771,6 +998,13 @@ <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter="" default="false"> If [code]true[/code], forces snapping of polygons to pixels in 2D rendering. May help in some pixel art styles. </member> + <member name="rendering/quality/depth/hdr" type="bool" setter="" getter="" default="true"> + If [code]true[/code], allocates the main framebuffer with high dynamic range. High dynamic range allows the use of [Color] values greater than 1. + [b]Note:[/b] Only available on the GLES3 backend. + </member> + <member name="rendering/quality/depth/hdr.mobile" type="bool" setter="" getter="" default="false"> + Lower-end override for [member rendering/quality/depth/hdr] on mobile devices, due to performance concerns or driver support. + </member> <member name="rendering/quality/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default=""PowerVR,Mali,Adreno,Apple""> Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. </member> @@ -781,6 +1015,7 @@ The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2. </member> <member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048"> + Lower-end override for [member rendering/quality/directional_shadow/size] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default=""GLES3""> The video driver to use ("GLES2" or "GLES3"). @@ -793,38 +1028,58 @@ <member name="rendering/quality/filters/anisotropic_filter_level" type="int" setter="" getter="" default="4"> Maximum anisotropic filter level used for textures with anisotropy enabled. Higher values will result in sharper textures when viewed from oblique angles, at the cost of performance. Only power-of-two values are valid (2, 4, 8, 16). </member> + <member name="rendering/quality/filters/msaa" type="int" setter="" getter="" default="0"> + Sets the number of MSAA samples to use. MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. + [b]Note:[/b] MSAA is not available on HTML5 export using the GLES2 backend. + </member> <member name="rendering/quality/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/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2"> - Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). + Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment]. </member> <member name="rendering/quality/intended_usage/framebuffer_allocation.mobile" type="int" setter="" getter="" default="3"> + Lower-end override for [member rendering/quality/intended_usage/framebuffer_allocation] on mobile devices, due to performance concerns or driver support. + </member> + <member name="rendering/quality/reflections/atlas_size" type="int" setter="" getter="" default="2048"> + Size of the atlas used by reflection probes. A larger size can result in higher visual quality, while a smaller size will be faster and take up less memory. + </member> + <member name="rendering/quality/reflections/atlas_subdiv" type="int" setter="" getter="" default="8"> + Number of subdivisions to use for the reflection atlas. A higher number lowers the quality of each atlas, but allows you to use more. </member> <member name="rendering/quality/reflections/high_quality_ggx" type="bool" setter="" getter="" default="true"> If [code]true[/code], uses a high amount of samples to create blurred variants of reflection probes and panorama backgrounds (sky). Those blurred variants are used by rough materials. </member> <member name="rendering/quality/reflections/high_quality_ggx.mobile" type="bool" setter="" getter="" default="false"> + Lower-end override for [member rendering/quality/reflections/high_quality_ggx] on mobile devices, due to performance concerns or driver support. + </member> + <member name="rendering/quality/reflections/irradiance_max_size" type="int" setter="" getter="" default="128"> + Limits the size of the irradiance map which is normally determined by [member Sky.radiance_size]. A higher size results in a higher quality irradiance map similarly to [member rendering/quality/reflections/high_quality_ggx]. Use a higher value when using high-frequency HDRI maps, otherwise keep this as low as possible. + [b]Note:[/b] Low and mid range hardware do not support complex irradiance maps well and may crash if this is set too high. </member> <member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter="" default="true"> If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise on reflections, but costs more performance and memory. </member> <member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false"> + Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/quality/shading/force_blinn_over_ggx" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model. </member> <member name="rendering/quality/shading/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true"> + Lower-end override for [member rendering/quality/shading/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/quality/shading/force_lambert_over_burley" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley. </member> <member name="rendering/quality/shading/force_lambert_over_burley.mobile" type="bool" setter="" getter="" default="true"> + Lower-end override for [member rendering/quality/shading/force_lambert_over_burley] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/quality/shading/force_vertex_shading" type="bool" setter="" getter="" default="false"> If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices. </member> <member name="rendering/quality/shading/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true"> + Lower-end override for [member rendering/quality/shading/force_vertex_shading] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="1"> Subdivision quadrant size for shadow mapping. See shadow mapping documentation. @@ -842,19 +1097,22 @@ Size for shadow atlas (used for OmniLights and SpotLights). See documentation. </member> <member name="rendering/quality/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048"> + Lower-end override for [member rendering/quality/shadow_atlas/size] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/quality/shadows/filter_mode" type="int" setter="" getter="" default="1"> Shadow filter mode. Higher-quality settings result in smoother shadows that flicker less when moving. "Disabled" is the fastest option, but also has the lowest quality. "PCF5" is smoother but is also slower. "PCF13" is the smoothest option, but is also the slowest. </member> <member name="rendering/quality/shadows/filter_mode.mobile" type="int" setter="" getter="" default="0"> + Lower-end override for [member rendering/quality/shadows/filter_mode] on mobile devices, due to performance concerns or driver support. </member> <member name="rendering/quality/subsurface_scattering/follow_surface" type="bool" setter="" getter="" default="false"> Improves quality of subsurface scattering, but cost significantly increases. </member> <member name="rendering/quality/subsurface_scattering/quality" type="int" setter="" getter="" default="1"> - Quality setting for subsurface scaterring (samples taken). + Quality setting for subsurface scattering (samples taken). </member> <member name="rendering/quality/subsurface_scattering/scale" type="int" setter="" getter="" default="1.0"> + Max radius used for subsurface scattering samples. </member> <member name="rendering/quality/subsurface_scattering/weight_samples" type="bool" setter="" getter="" default="true"> Weight subsurface scattering samples. Helps to avoid reading samples from unrelated parts of the screen. @@ -880,8 +1138,6 @@ <member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles. </member> - <member name="script" type="Script" setter="" getter=""> - </member> </members> <constants> </constants> diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml index 3c081bf91f..dee1a3daf0 100644 --- a/doc/classes/ProximityGroup.xml +++ b/doc/classes/ProximityGroup.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ProximityGroup" inherits="Spatial" category="Core" version="3.2"> +<class name="ProximityGroup" inherits="Spatial" version="4.0"> <brief_description> General-purpose proximity detection node. </brief_description> diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml index 36c65f1096..fdff8908d5 100644 --- a/doc/classes/ProxyTexture.xml +++ b/doc/classes/ProxyTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ProxyTexture" inherits="Texture" category="Core" version="3.2"> +<class name="ProxyTexture" inherits="Texture" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 209e91eef2..422add08d1 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="QuadMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="QuadMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Class representing a square mesh. </brief_description> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index f5ee99d30c..f11f20f1f9 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Quat" category="Built-In Types" version="3.2"> +<class name="Quat" version="4.0"> <brief_description> Quaternion. </brief_description> @@ -100,6 +100,7 @@ <argument index="0" name="quat" type="Quat"> </argument> <description> + Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_normalized"> @@ -194,6 +195,7 @@ </members> <constants> <constant name="IDENTITY" value="Quat( 0, 0, 0, 1 )"> + The identity rotation. Equivalent to an identity matrix. If a vector is transformed by an identity quaternion, it will not change. </constant> </constants> </class> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 5edef100c5..77c608fccb 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RID" category="Built-In Types" version="3.2"> +<class name="RID" version="4.0"> <brief_description> Handle for a [Resource]'s unique ID. </brief_description> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index 9054e2fa88..ec0f1a96b2 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RandomNumberGenerator" inherits="Reference" category="Core" version="3.2"> +<class name="RandomNumberGenerator" inherits="Reference" version="4.0"> <brief_description> A class for generating pseudo-random numbers. </brief_description> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 82fffd0cb8..8690f6d7e7 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Range" inherits="Control" category="Core" version="3.2"> +<class name="Range" inherits="Control" version="4.0"> <brief_description> Abstract base class for range-based controls. </brief_description> diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml index 5e17d6e7d7..65f632ba74 100644 --- a/doc/classes/RayCast.xml +++ b/doc/classes/RayCast.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RayCast" inherits="Spatial" category="Core" version="3.2"> +<class name="RayCast" inherits="Spatial" version="4.0"> <brief_description> Query the closest object intersecting a ray. </brief_description> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index c5ba5da24e..51f3f0334d 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RayCast2D" inherits="Node2D" category="Core" version="3.2"> +<class name="RayCast2D" inherits="Node2D" version="4.0"> <brief_description> Query the closest object intersecting a ray. </brief_description> diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml index 3f5859714e..87a642f779 100644 --- a/doc/classes/RayShape.xml +++ b/doc/classes/RayShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RayShape" inherits="Shape" category="Core" version="3.2"> +<class name="RayShape" inherits="Shape" version="4.0"> <brief_description> Ray shape for 3D collisions. </brief_description> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml index 377a19e8da..432c650074 100644 --- a/doc/classes/RayShape2D.xml +++ b/doc/classes/RayShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RayShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="RayShape2D" inherits="Shape2D" version="4.0"> <brief_description> Ray shape for 2D collisions. </brief_description> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 07fa7777fe..e32b19ff00 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Rect2" category="Built-In Types" version="3.2"> +<class name="Rect2" version="4.0"> <brief_description> 2D axis-aligned bounding box. </brief_description> @@ -143,6 +143,7 @@ <argument index="0" name="rect" type="Rect2"> </argument> <description> + Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="merge"> @@ -151,7 +152,7 @@ <argument index="0" name="b" type="Rect2"> </argument> <description> - Returns a larger Rect2 that contains this Rect2 and [code]b[/code]. + Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code]. </description> </method> </methods> diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml index d55324c98f..b42cc48d43 100644 --- a/doc/classes/RectangleShape2D.xml +++ b/doc/classes/RectangleShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RectangleShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="RectangleShape2D" inherits="Shape2D" version="4.0"> <brief_description> Rectangle shape for 2D collisions. </brief_description> diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml index 70d41b665a..860a47798c 100644 --- a/doc/classes/Reference.xml +++ b/doc/classes/Reference.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Reference" inherits="Object" category="Core" version="3.2"> +<class name="Reference" inherits="Object" version="4.0"> <brief_description> Base class for reference-counted objects. </brief_description> diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml index 393a72cf60..4f8f71b3db 100644 --- a/doc/classes/ReferenceRect.xml +++ b/doc/classes/ReferenceRect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ReferenceRect" inherits="Control" category="Core" version="3.2"> +<class name="ReferenceRect" inherits="Control" version="4.0"> <brief_description> Reference frame for GUI. </brief_description> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index 0a1cf962c8..9c7a645fec 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ReflectionProbe" inherits="VisualInstance" category="Core" version="3.2"> +<class name="ReflectionProbe" inherits="VisualInstance" version="4.0"> <brief_description> Captures its surroundings to create reflections. </brief_description> <description> Capture its surroundings as a dual parabolid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses. + The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [GIProbe]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/reflection_probes.html</link> @@ -16,34 +17,45 @@ If [code]true[/code], enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. </member> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575"> + Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost. </member> <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> <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0"> - Defines the reflection intensity. + Defines the reflection intensity. Intensity modulates the strength of the reflection. </member> <member name="interior_ambient_color" type="Color" setter="set_interior_ambient" getter="get_interior_ambient" default="Color( 0, 0, 0, 1 )"> + Sets the ambient light color to be used when this probe is set to [member interior_enable]. </member> <member name="interior_ambient_contrib" type="float" setter="set_interior_ambient_probe_contribution" getter="get_interior_ambient_probe_contribution" default="0.0"> + Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [member interior_enable]. Useful so that ambient light matches the color of the room. </member> <member name="interior_ambient_energy" type="float" setter="set_interior_ambient_energy" getter="get_interior_ambient_energy" default="1.0"> + Sets the energy multiplier for this reflection probe's ambient light contribution when set to [member interior_enable]. </member> <member name="interior_enable" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false"> + If [code]true[/code], reflections will ignore sky contribution. Ambient lighting is then controlled by the [code]interior_ambient_*[/code] properties. </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0"> + Sets the max distance away from the probe an object can be before it is culled. </member> <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3( 0, 0, 0 )"> + Sets the origin offset to be used when this reflection probe is in box project mode. </member> <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0"> + Sets how frequently the probe is updated. Can be [constant UPDATE_ONCE] or [constant UPDATE_ALWAYS]. </member> </members> <constants> <constant name="UPDATE_ONCE" value="0" enum="UpdateMode"> + Update the probe once on the next frame. </constant> <constant name="UPDATE_ALWAYS" value="1" enum="UpdateMode"> + Update the probe every frame. This is needed when you want to capture dynamic objects. However, it results in an increased render time. Use [constant UPDATE_ONCE] whenever possible. </constant> </constants> </class> diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml index 377f9cc34b..feb6ac1841 100644 --- a/doc/classes/RemoteTransform.xml +++ b/doc/classes/RemoteTransform.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.2"> +<class name="RemoteTransform" inherits="Spatial" version="4.0"> <brief_description> RemoteTransform pushes its own [Transform] to another [Spatial] derived Node in the scene. </brief_description> diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml index f5d509782f..84ec673920 100644 --- a/doc/classes/RemoteTransform2D.xml +++ b/doc/classes/RemoteTransform2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.2"> +<class name="RemoteTransform2D" inherits="Node2D" version="4.0"> <brief_description> RemoteTransform2D pushes its own [Transform2D] to another [CanvasItem] derived Node in the scene. </brief_description> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index a50f5c97d1..496b1c4f3c 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Resource" inherits="Reference" category="Core" version="3.2"> +<class name="Resource" inherits="Reference" version="4.0"> <brief_description> Base class for all resources. </brief_description> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index ce37691e0a..fc36f922e1 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoader" inherits="Reference" category="Core" version="3.2"> +<class name="ResourceFormatLoader" inherits="Reference" version="4.0"> <brief_description> Loads a specific resource type from a file. </brief_description> diff --git a/doc/classes/ResourceFormatLoaderCrypto.xml b/doc/classes/ResourceFormatLoaderCrypto.xml index 8bc7d50c75..fda529fdbd 100644 --- a/doc/classes/ResourceFormatLoaderCrypto.xml +++ b/doc/classes/ResourceFormatLoaderCrypto.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatLoaderCrypto" inherits="ResourceFormatLoader" category="Core" version="3.2"> +<class name="ResourceFormatLoaderCrypto" inherits="ResourceFormatLoader" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index 5ad5ab49b1..369c158ce4 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatSaver" inherits="Reference" category="Core" version="3.2"> +<class name="ResourceFormatSaver" inherits="Reference" version="4.0"> <brief_description> Saves a specific resource type to a file. </brief_description> diff --git a/doc/classes/ResourceFormatSaverCrypto.xml b/doc/classes/ResourceFormatSaverCrypto.xml index 2f7d224dab..31db8ff4f5 100644 --- a/doc/classes/ResourceFormatSaverCrypto.xml +++ b/doc/classes/ResourceFormatSaverCrypto.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceFormatSaverCrypto" inherits="ResourceFormatSaver" category="Core" version="3.2"> +<class name="ResourceFormatSaverCrypto" inherits="ResourceFormatSaver" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml index e0c0aa9a47..0475d2c94d 100644 --- a/doc/classes/ResourceImporter.xml +++ b/doc/classes/ResourceImporter.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceImporter" inherits="Reference" category="Core" version="3.2"> +<class name="ResourceImporter" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml index df552d3656..64e94c4f2d 100644 --- a/doc/classes/ResourceInteractiveLoader.xml +++ b/doc/classes/ResourceInteractiveLoader.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.2"> +<class name="ResourceInteractiveLoader" inherits="Reference" version="4.0"> <brief_description> Interactive [Resource] loader. </brief_description> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 31bba18171..661043b083 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceLoader" inherits="Object" category="Core" version="3.2"> +<class name="ResourceLoader" inherits="Object" version="4.0"> <brief_description> Singleton used to load resource files. </brief_description> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 2b00c038e1..1e0dcaaea8 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourcePreloader" inherits="Node" category="Core" version="3.2"> +<class name="ResourcePreloader" inherits="Node" version="4.0"> <brief_description> Resource Preloader Node. </brief_description> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index f12d26d4b9..8c27b951f5 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ResourceSaver" inherits="Object" category="Core" version="3.2"> +<class name="ResourceSaver" inherits="Object" version="4.0"> <brief_description> Singleton for saving Godot-specific resource types. </brief_description> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index 5c3ffd9cff..34431c5153 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -1,10 +1,20 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RichTextEffect" inherits="Resource" category="Core" version="3.2"> +<class name="RichTextEffect" inherits="Resource" version="4.0"> <brief_description> + A custom effect for use with [RichTextLabel]. </brief_description> <description> + A custom effect for use with [RichTextLabel]. + [b]Note:[/b] For a [RichTextEffect] to be usable, a BBCode tag must be defined as a member variable called [code]bbcode[/code] in the script. + [codeblock] + # The RichTextEffect will be usable like this: `[example]Some text[/example]` + var bbcode = "example" + [/codeblock] + [b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> <method name="_process_custom_fx" qualifiers="virtual"> @@ -13,6 +23,7 @@ <argument index="0" name="char_fx" type="CharFXTransform"> </argument> <description> + Override this method to modify properties in [code]char_fx[/code]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text. </description> </method> </methods> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 2962391b99..bad3625abc 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RichTextLabel" inherits="Control" category="Core" version="3.2"> +<class name="RichTextLabel" inherits="Control" version="4.0"> <brief_description> Label that displays rich text. </brief_description> @@ -91,6 +91,7 @@ <argument index="0" name="effect" type="Variant"> </argument> <description> + Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect]. </description> </method> <method name="newline"> @@ -115,6 +116,7 @@ <argument index="0" name="expressions" type="PoolStringArray"> </argument> <description> + Parses BBCode parameter [code]expressions[/code] into a dictionary. </description> </method> <method name="pop"> @@ -137,12 +139,14 @@ <return type="void"> </return> <description> + Adds a [code][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code][b][/code] tag if not currently in a [code][i][/code] tag. </description> </method> <method name="push_bold_italics"> <return type="void"> </return> <description> + Adds a [code][font][/code] tag with a bold italics font to the tag stack. </description> </method> <method name="push_cell"> @@ -176,13 +180,14 @@ <argument index="0" name="level" type="int"> </argument> <description> - Adds an [code][indent][/code] tag to the tag stack. Multiplies "level" by current tab_size to determine new margin length. + Adds an [code][indent][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length. </description> </method> <method name="push_italics"> <return type="void"> </return> <description> + Adds a [code][font][/code] tag with a italics font to the tag stack. This is the same as adding a [code][i][/code] tag if not currently in a [code][b][/code] tag. </description> </method> <method name="push_list"> @@ -207,12 +212,14 @@ <return type="void"> </return> <description> + Adds a [code][font][/code] tag with a monospace font to the tag stack. </description> </method> <method name="push_normal"> <return type="void"> </return> <description> + Adds a [code][font][/code] tag with a normal font to the tag stack. </description> </method> <method name="push_strikethrough"> @@ -245,6 +252,7 @@ </argument> <description> Removes a line of content from the label. Returns [code]true[/code] if the line exists. + The [code]line[/code] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code]. </description> </method> <method name="scroll_to_line"> @@ -278,8 +286,11 @@ </member> <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default=""""> The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. + [b]Note:[/b] It is unadvised to use [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead. </member> <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]"> + The currently installed custom effects. This is an array of [RichTextEffect]s. + To add a custom effect, it's more convenient to use [method install_effect]. </member> <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true"> If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. @@ -288,11 +299,12 @@ If [code]true[/code], the label uses the custom font color. </member> <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0"> - The text's visibility, as a [float] between 0.0 and 1.0. + The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. + [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count]. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true"> - If [code]true[/code], the scrollbar is visible. Does not block scrolling completely. See [method scroll_to_line]. + If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line]. </member> <member name="scroll_following" type="bool" setter="set_scroll_follow" getter="is_scroll_following" default="false"> If [code]true[/code], the window scrolls down to display new content automatically. @@ -313,21 +325,21 @@ </members> <signals> <signal name="meta_clicked"> - <argument index="0" name="meta" type="Nil"> + <argument index="0" name="meta" type="Variant"> </argument> <description> - Triggered when the user clicks on content between [code][url][/code] tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack. + Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack. </description> </signal> <signal name="meta_hover_ended"> - <argument index="0" name="meta" type="Nil"> + <argument index="0" name="meta" type="Variant"> </argument> <description> Triggers when the mouse exits a meta tag. </description> </signal> <signal name="meta_hover_started"> - <argument index="0" name="meta" type="Nil"> + <argument index="0" name="meta" type="Variant"> </argument> <description> Triggers when the mouse enters a meta tag. @@ -336,18 +348,25 @@ </signals> <constants> <constant name="ALIGN_LEFT" value="0" enum="Align"> + Makes text left aligned. </constant> <constant name="ALIGN_CENTER" value="1" enum="Align"> + Makes text centered. </constant> <constant name="ALIGN_RIGHT" value="2" enum="Align"> + Makes text right aligned. </constant> <constant name="ALIGN_FILL" value="3" enum="Align"> + Makes text fill width. </constant> <constant name="LIST_NUMBERS" value="0" enum="ListType"> + Each list item has a number marker. </constant> <constant name="LIST_LETTERS" value="1" enum="ListType"> + Each list item has a letter marker. </constant> <constant name="LIST_DOTS" value="2" enum="ListType"> + Each list item has a filled circle marker. </constant> <constant name="ITEM_FRAME" value="0" enum="ItemType"> </constant> diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 624b576f4d..19c0363963 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RigidBody" inherits="PhysicsBody" category="Core" version="3.2"> +<class name="RigidBody" inherits="PhysicsBody" version="4.0"> <brief_description> Physics Body whose position is determined through physics simulation in 3D space. </brief_description> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index c960ef5aee..958c6f0504 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RigidBody2D" inherits="PhysicsBody2D" category="Core" version="3.2"> +<class name="RigidBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> A body that is controlled by the 2D physics engine. </brief_description> diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml index bb939e82f3..654e42a3c6 100644 --- a/doc/classes/RootMotionView.xml +++ b/doc/classes/RootMotionView.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RootMotionView" inherits="VisualInstance" category="Core" version="3.2"> +<class name="RootMotionView" inherits="VisualInstance" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index 3bd958bfd4..7304e03bf6 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SceneState" inherits="Reference" category="Core" version="3.2"> +<class name="SceneState" inherits="Reference" version="4.0"> <brief_description> A script interface to a scene file's data. </brief_description> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index bf22b865d3..1499173d6b 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SceneTree" inherits="MainLoop" category="Core" version="3.2"> +<class name="SceneTree" inherits="MainLoop" version="4.0"> <brief_description> Manages the game loop via a hierarchy of nodes. </brief_description> @@ -185,8 +185,10 @@ <method name="quit"> <return type="void"> </return> + <argument index="0" name="exit_code" type="int" default="-1"> + </argument> <description> - Quits the application. + Quits the application. A process [code]exit_code[/code] can optionally be passed as an argument. If this argument is [code]0[/code] or greater, it will override the [member OS.exit_code] defined before quitting the application. </description> </method> <method name="reload_current_scene"> @@ -289,7 +291,7 @@ If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false"> If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior: @@ -327,9 +329,9 @@ </description> </signal> <signal name="global_menu_action"> - <argument index="0" name="id" type="Nil"> + <argument index="0" name="id" type="Variant"> </argument> - <argument index="1" name="meta" type="Nil"> + <argument index="1" name="meta" type="Variant"> </argument> <description> Emitted whenever global menu item is clicked. diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml index 5678833752..a4a83fa65b 100644 --- a/doc/classes/SceneTreeTimer.xml +++ b/doc/classes/SceneTreeTimer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SceneTreeTimer" inherits="Reference" category="Core" version="3.2"> +<class name="SceneTreeTimer" inherits="Reference" version="4.0"> <brief_description> One-shot timer. </brief_description> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index e8a88acdb5..0f07cb83f3 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Script" inherits="Resource" category="Core" version="3.2"> +<class name="Script" inherits="Resource" version="4.0"> <brief_description> A class stored as a resource. </brief_description> <description> - A class stored as a resource. A script exends the functionality of all objects that instance it. + A class stored as a resource. A script extends the functionality of all objects that instance it. The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. </description> <tutorials> diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index 3d0fa9a0d5..9f16a6ed46 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ScriptCreateDialog" inherits="ConfirmationDialog" category="Core" version="3.2"> +<class name="ScriptCreateDialog" inherits="ConfirmationDialog" version="4.0"> <brief_description> The Editor's popup dialog for creating new [Script] files. </brief_description> @@ -24,6 +24,8 @@ </argument> <argument index="2" name="built_in_enabled" type="bool" default="true"> </argument> + <argument index="3" name="load_enabled" type="bool" default="true"> + </argument> <description> Prefills required fields to configure the ScriptCreateDialog for use. </description> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 28e1f75ac1..ed401d6853 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ScriptEditor" inherits="PanelContainer" category="Core" version="3.2"> +<class name="ScriptEditor" inherits="PanelContainer" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml index ea30b9d48c..b1eb9c012b 100644 --- a/doc/classes/ScrollBar.xml +++ b/doc/classes/ScrollBar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ScrollBar" inherits="Range" category="Core" version="3.2"> +<class name="ScrollBar" inherits="Range" version="4.0"> <brief_description> Base class for scroll bars. </brief_description> @@ -12,6 +12,7 @@ </methods> <members> <member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0"> + Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused. </member> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="0" /> <member name="step" type="float" setter="set_step" getter="get_step" override="true" default="0.0" /> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 5218b65886..0b113bebe5 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ScrollContainer" inherits="Container" category="Core" version="3.2"> +<class name="ScrollContainer" inherits="Container" version="4.0"> <brief_description> A helper node for displaying scrollable elements such as lists. </brief_description> @@ -13,16 +13,21 @@ <return type="HScrollBar"> </return> <description> + Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer]. </description> </method> <method name="get_v_scrollbar"> <return type="VScrollBar"> </return> <description> + Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer]. </description> </method> </methods> <members> + <member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" default="false"> + If [code]true[/code], the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible. + </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0"> </member> @@ -55,6 +60,7 @@ </constants> <theme_items> <theme_item name="bg" type="StyleBox"> + The background [StyleBox] of the [ScrollContainer]. </theme_item> </theme_items> </class> diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml index e9e9d01a42..31c0f7f1f3 100644 --- a/doc/classes/SegmentShape2D.xml +++ b/doc/classes/SegmentShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SegmentShape2D" inherits="Shape2D" category="Core" version="3.2"> +<class name="SegmentShape2D" inherits="Shape2D" version="4.0"> <brief_description> Segment shape for 2D collisions. </brief_description> diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index 74970be8b4..eca98fb10e 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Semaphore" inherits="Reference" category="Core" version="3.2"> +<class name="Semaphore" inherits="Reference" version="4.0"> <brief_description> A synchronization semaphore. </brief_description> diff --git a/doc/classes/Separator.xml b/doc/classes/Separator.xml index 11f6f1b22f..ef79851aab 100644 --- a/doc/classes/Separator.xml +++ b/doc/classes/Separator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Separator" inherits="Control" category="Core" version="3.2"> +<class name="Separator" inherits="Control" version="4.0"> <brief_description> Base class for separators. </brief_description> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index be9509fda5..cab906ee25 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -1,13 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Shader" inherits="Resource" category="Core" version="3.2"> +<class name="Shader" inherits="Resource" version="4.0"> <brief_description> A custom shader program. </brief_description> <description> - This class allows you to define a custom shader program that can be used for various materials to render objects. + This class allows you to define a custom shader program that can be used by a [ShaderMaterial]. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/shading/your_first_shader/what_are_shaders.html</link> </tutorials> <methods> <method name="get_default_texture_param" qualifiers="const"> @@ -16,13 +17,15 @@ <argument index="0" name="param" type="String"> </argument> <description> + Returns the texture that is set as default for the specified parameter. + [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> <method name="get_mode" qualifiers="const"> <return type="int" enum="Shader.Mode"> </return> <description> - Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES] + Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES]. </description> </method> <method name="has_param" qualifiers="const"> @@ -31,6 +34,8 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the shader has this param defined as a uniform in its code. + [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> <method name="set_default_texture_param"> @@ -41,19 +46,25 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial]. + [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> </methods> <members> <member name="code" type="String" setter="set_code" getter="get_code" default=""""> + Returns the shader's code as the user has written it, not the full generated code used internally. </member> </members> <constants> <constant name="MODE_SPATIAL" value="0" enum="Mode"> + Mode used to draw all 3D objects. </constant> <constant name="MODE_CANVAS_ITEM" value="1" enum="Mode"> + Mode used to draw all 2D objects. </constant> <constant name="MODE_PARTICLES" value="2" enum="Mode"> + Mode used to calculate particle information on a per-particle basis. Not used for drawing. </constant> </constants> </class> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index ef355c4417..adb30c14d1 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ShaderMaterial" inherits="Material" category="Core" version="3.2"> +<class name="ShaderMaterial" inherits="Material" version="4.0"> <brief_description> A material that uses a custom [Shader] program. </brief_description> @@ -7,7 +7,7 @@ A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/shading/index.html</link> </tutorials> <methods> <method name="get_shader_param" qualifiers="const"> @@ -25,6 +25,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. </description> </method> <method name="property_get_revert"> @@ -33,6 +34,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the default value of the material property with given [code]name[/code]. </description> </method> <method name="set_shader_param"> @@ -43,7 +45,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Changes the value set for this material of a uniform in the shader. + Changes the value set for this material of a uniform in the shader. [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> </methods> diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml index ce5947bc06..d70d2c09b3 100644 --- a/doc/classes/Shape.xml +++ b/doc/classes/Shape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Shape" inherits="Resource" category="Core" version="3.2"> +<class name="Shape" inherits="Resource" version="4.0"> <brief_description> Base class for all 3D shape resources. </brief_description> @@ -13,6 +13,7 @@ </methods> <members> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> + The collision margin for the shape. </member> </members> <constants> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 2c3120f04d..9e913cb44d 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Shape2D" inherits="Resource" category="Core" version="3.2"> +<class name="Shape2D" inherits="Resource" version="4.0"> <brief_description> Base class for all 2D shapes. </brief_description> @@ -77,6 +77,7 @@ </methods> <members> <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0"> + The shape's custom solver bias. </member> </members> <constants> diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml index 4c5dc0e77b..9a2a761969 100644 --- a/doc/classes/ShortCut.xml +++ b/doc/classes/ShortCut.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ShortCut" inherits="Resource" category="Core" version="3.2"> +<class name="ShortCut" inherits="Resource" version="4.0"> <brief_description> A shortcut for binding input. </brief_description> diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml index 7cd95390e6..1fc8b2eb35 100644 --- a/doc/classes/Skeleton.xml +++ b/doc/classes/Skeleton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Skeleton" inherits="Spatial" category="Core" version="3.2"> +<class name="Skeleton" inherits="Spatial" version="4.0"> <brief_description> Skeleton for characters and animated objects. </brief_description> diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index 886e8244a2..e1b7d60763 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Skeleton2D" inherits="Node2D" category="Core" version="3.2"> +<class name="Skeleton2D" inherits="Node2D" version="4.0"> <brief_description> Skeleton for 2D characters and animated objects. </brief_description> <description> + Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones. </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link> </tutorials> <methods> <method name="get_bone"> @@ -15,19 +16,21 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [code]idx[/code]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling. </description> </method> <method name="get_bone_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the amount of bones in the skeleton. + Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D. </description> </method> <method name="get_skeleton" qualifiers="const"> <return type="RID"> </return> <description> + Returns the [RID] of a Skeleton2D instance. </description> </method> </methods> diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK.xml index 2f35826cc7..0f07031708 100644 --- a/doc/classes/SkeletonIK.xml +++ b/doc/classes/SkeletonIK.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SkeletonIK" inherits="Node" category="Core" version="3.2"> +<class name="SkeletonIK" inherits="Node" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml index 174febc883..b65d9d8f98 100644 --- a/doc/classes/Skin.xml +++ b/doc/classes/Skin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Skin" inherits="Resource" category="Core" version="3.2"> +<class name="Skin" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml index c12957654f..8fc163f88d 100644 --- a/doc/classes/SkinReference.xml +++ b/doc/classes/SkinReference.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SkinReference" inherits="Reference" category="Core" version="3.2"> +<class name="SkinReference" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml index 398a988d9e..11cea6dbc3 100644 --- a/doc/classes/Sky.xml +++ b/doc/classes/Sky.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Sky" inherits="Resource" category="Core" version="3.2"> +<class name="Sky" inherits="Resource" version="4.0"> <brief_description> The base class for [PanoramaSky] and [ProceduralSky]. </brief_description> @@ -14,6 +14,7 @@ <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize" default="2"> The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be. See [enum RadianceSize] constants for values. + [b]Note:[/b] Some hardware will have trouble with higher radiance sizes, especially [constant RADIANCE_SIZE_512] and above. Only use such high values on high-end hardware. </member> </members> <constants> diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml index 14176da44f..68776df603 100644 --- a/doc/classes/Slider.xml +++ b/doc/classes/Slider.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Slider" inherits="Range" category="Core" version="3.2"> +<class name="Slider" inherits="Range" version="4.0"> <brief_description> Base class for GUI sliders. </brief_description> diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml index 3f22b5a37c..dc0cf96eb4 100644 --- a/doc/classes/SliderJoint.xml +++ b/doc/classes/SliderJoint.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SliderJoint" inherits="Joint" category="Core" version="3.2"> +<class name="SliderJoint" inherits="Joint" version="4.0"> <brief_description> Piston kind of slider between two bodies in 3D. </brief_description> diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody.xml index a51907b1bf..46a00fbd67 100644 --- a/doc/classes/SoftBody.xml +++ b/doc/classes/SoftBody.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SoftBody" inherits="MeshInstance" category="Core" version="3.2"> +<class name="SoftBody" inherits="MeshInstance" version="4.0"> <brief_description> A soft mesh physics body. </brief_description> diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index 0309e73eec..d057db8519 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Spatial" inherits="Node" category="Core" version="3.2"> +<class name="Spatial" inherits="Node" version="4.0"> <brief_description> Most basic 3D game object, parent of all 3D-related nodes. </brief_description> @@ -277,7 +277,7 @@ <argument index="0" name="offset" type="Vector3"> </argument> <description> - Changes the node's position by given offset [Vector3]. + Changes the node's position by the given offset [Vector3]. Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate. </description> </method> @@ -287,6 +287,7 @@ <argument index="0" name="offset" type="Vector3"> </argument> <description> + Changes the node's position by the given offset [Vector3] in local space. </description> </method> <method name="update_gizmo"> diff --git a/doc/classes/SpatialGizmo.xml b/doc/classes/SpatialGizmo.xml index 5cca1883b3..5260eaa8a3 100644 --- a/doc/classes/SpatialGizmo.xml +++ b/doc/classes/SpatialGizmo.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpatialGizmo" inherits="Reference" category="Core" version="3.2"> +<class name="SpatialGizmo" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index df315d7430..c6780511b9 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpatialMaterial" inherits="Material" category="Core" version="3.2"> +<class name="SpatialMaterial" inherits="Material" version="4.0"> <brief_description> Default 3D rendering material. </brief_description> @@ -16,6 +16,7 @@ <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature"> </argument> <description> + Returns [code]true[/code], if the specified [enum Feature] is enabled. </description> </method> <method name="get_flag" qualifiers="const"> @@ -24,6 +25,7 @@ <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags"> </argument> <description> + Returns [code]true[/code], if the specified flag is enabled. See [enum Flags] enumerator for options. </description> </method> <method name="get_texture" qualifiers="const"> @@ -32,6 +34,7 @@ <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam"> </argument> <description> + Returns the [Texture] associated with the specified [enum TextureParam]. </description> </method> <method name="set_feature"> @@ -42,6 +45,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], enables the specified [enum Feature]. Many features that are available in [SpatialMaterial]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to [code]true[/code]. </description> </method> <method name="set_flag"> @@ -52,6 +56,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], enables the specified flag. Flags are optional behaviour that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to [code]true[/code]. See [enum Flags] enumerator for options. </description> </method> <method name="set_texture"> @@ -62,6 +67,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets the [Texture] to be used by the specified [enum TextureParam]. This function is called when setting members ending in [code]*_texture[/code]. </description> </method> </methods> @@ -70,86 +76,115 @@ The material's base color. </member> <member name="albedo_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture to multiply by [member albedo_color]. Used for basic texturing of objects. </member> <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy"> The strength of the anisotropy effect. </member> <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. + If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken. </member> <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture"> + Texture that offsets the tangent map for anisotropy calculations. </member> <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], ambient occlusion is enabled. + If [code]true[/code], ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture]. </member> <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect"> + Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic. </member> <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag"> + If [code]true[/code], use [code]UV2[/code] coordinates to look up from the [member ao_texture]. </member> <member name="ao_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that defines the amount of ambient occlusion for a given point on the object. </member> <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="SpatialMaterial.TextureChannel"> + Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat"> + Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect. </member> <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the material. + If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough. </member> <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss"> + Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat. </member> <member name="clearcoat_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel. </member> <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled"> + If [code]true[/code], the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping. </member> <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also [member normal_enabled]. </member> <member name="depth_flip_binormal" type="bool" setter="set_depth_deep_parallax_flip_binormal" getter="get_depth_deep_parallax_flip_binormal"> + If [code]true[/code], direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect. </member> <member name="depth_flip_tangent" type="bool" setter="set_depth_deep_parallax_flip_tangent" getter="get_depth_deep_parallax_flip_tangent"> + If [code]true[/code], direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect. </member> <member name="depth_max_layers" type="int" setter="set_depth_deep_parallax_max_layers" getter="get_depth_deep_parallax_max_layers"> + Number of layers to use when using [member depth_deep_parallax] and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. </member> <member name="depth_min_layers" type="int" setter="set_depth_deep_parallax_min_layers" getter="get_depth_deep_parallax_min_layers"> + Number of layers to use when using [member depth_deep_parallax] and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. </member> <member name="depth_scale" type="float" setter="set_depth_scale" getter="get_depth_scale"> + Scales the depth offset effect. A higher number will create a larger depth. </member> <member name="depth_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to determine depth at a given pixel. Depth is always stored in the red channel. </member> <member name="detail_albedo" type="Texture" setter="set_texture" getter="get_texture"> + Texture that specifies the color of the detail overlay. </member> <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="SpatialMaterial.BlendMode"> + Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options. </member> <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures. </member> <member name="detail_mask" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to specify how the detail textures get blended with the base textures. </member> <member name="detail_normal" type="Texture" setter="set_texture" getter="get_texture"> + Texture that specifies the per-pixel normal of the detail overlay. </member> <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV"> + Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options. </member> <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance"> + Distance at which the object fades fully and is no longer visible. </member> <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance"> + Distance at which the object starts to fade. If the object is less than this distance away it will appear normal. </member> <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="SpatialMaterial.DistanceFadeMode" default="0"> + Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s. </member> <member name="emission" type="Color" setter="set_emission" getter="get_emission"> The emitted light's color. See [member emission_enabled]. </member> <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], the body emits light. + If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] or [BakedLightmap] is used and this object is used in baked lighting. </member> <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> The emitted light's strength. See [member emission_enabled]. </member> <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag"> + Use [code]UV2[/code] to read from the [member emission_texture]. </member> <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="SpatialMaterial.EmissionOperator"> + Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options. </member> <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that specifies how much surface emits light at a given point. </member> <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> + Forces a conversion of the [member albedo_texture] from sRGB space to linear space. </member> <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the object receives no ambient light. @@ -158,6 +193,7 @@ If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. </member> <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling. </member> <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the object is rendered at the same size regardless of distance. @@ -176,6 +212,7 @@ [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. </member> <member name="flags_use_shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. </member> <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. @@ -187,12 +224,14 @@ The reflectivity of the object's surface. The higher the value, the more light is reflected. </member> <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5"> - General reflectivity amount. + Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources. [b]Note:[/b] unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness]. </member> <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to specify metallic for an object. This is multiplied by [member metallic]. </member> <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel" default="0"> + Specifies the channel of the [member metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], normal mapping is enabled. @@ -201,10 +240,13 @@ The strength of the normal map's effect. </member> <member name="normal_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to specify the normal at a given pixel. The [code]normal_texture[/code] only uses the red and green channels. The normal read from [code]normal_texture[/code] is oriented around the surface normal provided by the [Mesh]. </member> <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold"> + Threshold at which the alpha scissor will discard values. </member> <member name="params_billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member params_billboard_mode] is [constant BILLBOARD_ENABLED]. </member> <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0"> Controls how the object faces the camera. See [enum BillboardMode]. @@ -229,6 +271,7 @@ Grows object vertices in the direction of their normals. </member> <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width" default="1.0"> + Currently unimplemented in Godot. </member> <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0"> The point size in pixels. See [member flags_use_point_size]. @@ -237,6 +280,7 @@ The method for rendering the specular blob. See [enum SpecularMode]. </member> <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the shader will discard all pixels that have an alpha value less than [member params_alpha_scissor_threshold]. </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. @@ -248,9 +292,10 @@ The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. </member> <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> + Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. </member> <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false"> - If [code]true[/code], the proximity and distance fade effect is enabled. + If [code]true[/code], the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object. </member> <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object. @@ -259,15 +304,19 @@ The strength of the refraction effect. </member> <member name="refraction_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale]. </member> <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="SpatialMaterial.TextureChannel"> + Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="rim" type="float" setter="set_rim" getter="get_rim"> + Sets the strength of the rim lighting effect. </member> <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> - If [code]true[/code], rim effect is enabled. + If [code]true[/code], rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. </member> <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim]. </member> <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint"> The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best. @@ -276,8 +325,10 @@ Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic]. </member> <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to control the roughness per-pixel. Multiplied by [member roughness]. </member> <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel" default="0"> + Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. </member> <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. @@ -286,6 +337,7 @@ The strength of the subsurface scattering effect. </member> <member name="subsurf_scatter_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength]. </member> <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission"> The color used by the transmission effect. Represents the light passing through an object. @@ -294,22 +346,31 @@ If [code]true[/code], the transmission effect is enabled. </member> <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture"> + Texture used to control the transmission effect per-pixel. Added to [member transmission]. </member> <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3( 0, 0, 0 )"> + How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture. </member> <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3( 1, 1, 1 )"> + How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function. </member> <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], instead of using [code]UV[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. </member> <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" default="1.0"> + A lower number blends the texture more softly while a higher number blends the texture more sharply. </member> <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3( 0, 0, 0 )"> + How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] in the vertex function. This can be used to offset a texture. </member> <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3( 1, 1, 1 )"> + How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function. </member> <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], instead of using [code]UV2[/code] textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. </member> <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" default="1.0"> + A lower number blends the texture more softly while a higher number blends the texture more sharply. </member> <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the model's vertex colors are processed as sRGB mode. @@ -320,79 +381,112 @@ </members> <constants> <constant name="TEXTURE_ALBEDO" value="0" enum="TextureParam"> + Texture specifying per-pixel color. </constant> <constant name="TEXTURE_METALLIC" value="1" enum="TextureParam"> + Texture specifying per-pixel metallic value. </constant> <constant name="TEXTURE_ROUGHNESS" value="2" enum="TextureParam"> + Texture specifying per-pixel roughness value. </constant> <constant name="TEXTURE_EMISSION" value="3" enum="TextureParam"> + Texture specifying per-pixel emission color. </constant> <constant name="TEXTURE_NORMAL" value="4" enum="TextureParam"> + Texture specifying per-pixel normal vector. </constant> <constant name="TEXTURE_RIM" value="5" enum="TextureParam"> + Texture specifying per-pixel rim value. </constant> <constant name="TEXTURE_CLEARCOAT" value="6" enum="TextureParam"> + Texture specifying per-pixel clearcoat value. </constant> <constant name="TEXTURE_FLOWMAP" value="7" enum="TextureParam"> + Texture specifying per-pixel flowmap direction for use with [member anisotropy]. </constant> <constant name="TEXTURE_AMBIENT_OCCLUSION" value="8" enum="TextureParam"> + Texture specifying per-pixel ambient occlusion value. </constant> <constant name="TEXTURE_DEPTH" value="9" enum="TextureParam"> + Texture specifying per-pixel depth. </constant> <constant name="TEXTURE_SUBSURFACE_SCATTERING" value="10" enum="TextureParam"> + Texture specifying per-pixel subsurface scattering. </constant> <constant name="TEXTURE_TRANSMISSION" value="11" enum="TextureParam"> + Texture specifying per-pixel transmission color. </constant> <constant name="TEXTURE_REFRACTION" value="12" enum="TextureParam"> + Texture specifying per-pixel refraction strength. </constant> <constant name="TEXTURE_DETAIL_MASK" value="13" enum="TextureParam"> + Texture specifying per-pixel detail mask blending value. </constant> <constant name="TEXTURE_DETAIL_ALBEDO" value="14" enum="TextureParam"> + Texture specifying per-pixel detail color. </constant> <constant name="TEXTURE_DETAIL_NORMAL" value="15" enum="TextureParam"> + Texture specifying per-pixel detail normal. </constant> <constant name="TEXTURE_MAX" value="16" enum="TextureParam"> Represents the size of the [enum TextureParam] enum. </constant> <constant name="DETAIL_UV_1" value="0" enum="DetailUV"> + Use [code]UV[/code] with the detail texture. </constant> <constant name="DETAIL_UV_2" value="1" enum="DetailUV"> + Use [code]UV2[/code] with the detail texture. </constant> <constant name="FEATURE_TRANSPARENT" value="0" enum="Feature"> + Constant for setting [member flags_transparent]. </constant> <constant name="FEATURE_EMISSION" value="1" enum="Feature"> + Constant for setting [member emission_enabled]. </constant> <constant name="FEATURE_NORMAL_MAPPING" value="2" enum="Feature"> + Constant for setting [member normal_enabled]. </constant> <constant name="FEATURE_RIM" value="3" enum="Feature"> + Constant for setting [member rim_enabled]. </constant> <constant name="FEATURE_CLEARCOAT" value="4" enum="Feature"> + Constant for setting [member clearcoat_enabled]. </constant> <constant name="FEATURE_ANISOTROPY" value="5" enum="Feature"> + Constant for setting [member anisotropy_enabled]. </constant> <constant name="FEATURE_AMBIENT_OCCLUSION" value="6" enum="Feature"> + Constant for setting [member ao_enabled]. </constant> <constant name="FEATURE_DEPTH_MAPPING" value="7" enum="Feature"> + Constant for setting [member depth_enabled]. </constant> <constant name="FEATURE_SUBSURACE_SCATTERING" value="8" enum="Feature"> + Constant for setting [member subsurf_scatter_enabled]. </constant> <constant name="FEATURE_TRANSMISSION" value="9" enum="Feature"> + Constant for setting [member transmission_enabled]. </constant> <constant name="FEATURE_REFRACTION" value="10" enum="Feature"> + Constant for setting [member refraction_enabled]. </constant> <constant name="FEATURE_DETAIL" value="11" enum="Feature"> + Constant for setting [member detail_enabled]. </constant> <constant name="FEATURE_MAX" value="12" enum="Feature"> Represents the size of the [enum Feature] enum. </constant> <constant name="BLEND_MODE_MIX" value="0" enum="BlendMode"> - Default blend mode. + Default blend mode. The color of the object is blended over the background based on the object's alpha value. </constant> <constant name="BLEND_MODE_ADD" value="1" enum="BlendMode"> + The color of the object is added to the background. </constant> <constant name="BLEND_MODE_SUB" value="2" enum="BlendMode"> + The color of the object is subtracted from the background. </constant> <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode"> + The color of the object is multiplied by the background. </constant> <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0" enum="DepthDrawMode"> Default depth draw mode. Depth is drawn only for opaque objects. @@ -416,42 +510,61 @@ No culling is performed. </constant> <constant name="FLAG_UNSHADED" value="0" enum="Flags"> + No lighting is used on the object. Color comes directly from [code]ALBEDO[/code]. </constant> <constant name="FLAG_USE_VERTEX_LIGHTING" value="1" enum="Flags"> + Lighting is calculated per-vertex rather than per-pixel. This can be used to increase the speed of the shader at the cost of quality. </constant> <constant name="FLAG_DISABLE_DEPTH_TEST" value="2" enum="Flags"> + Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. </constant> <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="3" enum="Flags"> + Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh. </constant> <constant name="FLAG_SRGB_VERTEX_COLOR" value="4" enum="Flags"> + Vertex color is in sRGB space and needs to be converted to linear. Only applies in the GLES3 renderer. </constant> <constant name="FLAG_USE_POINT_SIZE" value="5" enum="Flags"> + Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use [code]POINT_COORD[/code] instead of [code]UV[/code]. </constant> <constant name="FLAG_FIXED_SIZE" value="6" enum="Flags"> + Object is scaled by depth so that it always appears the same size on screen. </constant> <constant name="FLAG_BILLBOARD_KEEP_SCALE" value="7" enum="Flags"> + Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member params_billboard_mode] is [constant BILLBOARD_ENABLED]. </constant> <constant name="FLAG_UV1_USE_TRIPLANAR" value="8" enum="Flags"> + Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code]. </constant> <constant name="FLAG_UV2_USE_TRIPLANAR" value="9" enum="Flags"> + Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code]. </constant> <constant name="FLAG_AO_ON_UV2" value="11" enum="Flags"> + Use [code]UV2[/code] coordinates to look up from the [member ao_texture]. </constant> <constant name="FLAG_EMISSION_ON_UV2" value="12" enum="Flags"> + Use [code]UV2[/code] coordinates to look up from the [member emission_texture]. </constant> <constant name="FLAG_USE_ALPHA_SCISSOR" value="13" enum="Flags"> + Use alpha scissor. Set by [member params_use_alpha_scissor]. </constant> <constant name="FLAG_TRIPLANAR_USE_WORLD" value="10" enum="Flags"> + Use world coordinates in the triplanar texture lookup instead of local coordinates. </constant> <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="14" enum="Flags"> + Forces the shader to convert albedo from sRGB space to linear space. </constant> <constant name="FLAG_DONT_RECEIVE_SHADOWS" value="15" enum="Flags"> + Disables receiving shadows from other objects. </constant> <constant name="FLAG_DISABLE_AMBIENT_LIGHT" value="17" enum="Flags"> + Disables receiving ambient light. </constant> <constant name="FLAG_ENSURE_CORRECT_NORMALS" value="16" enum="Flags"> + Ensures that normals appear correct, even with non-uniform scaling. </constant> <constant name="FLAG_USE_SHADOW_TO_OPACITY" value="18" enum="Flags"> + Enables the shadow to opacity feature. </constant> <constant name="FLAG_MAX" value="19" enum="Flags"> Represents the size of the [enum Flags] enum. @@ -496,29 +609,41 @@ The object's X axis will always face the camera. </constant> <constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode"> - Used for particle systems. Enables particle animation options. + Used for particle systems when assigned to [Particles] and [CPUParticles] nodes. Enables [code]particles_anim_*[/code] properties. + The [member ParticlesMaterial.anim_speed] or [member CPUParticles.anim_speed] should also be set to a positive value for the animation to play. </constant> <constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel"> + Used to read from the red channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_GREEN" value="1" enum="TextureChannel"> + Used to read from the green channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_BLUE" value="2" enum="TextureChannel"> + Used to read from the blue channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_ALPHA" value="3" enum="TextureChannel"> + Used to read from the alpha channel of a texture. </constant> <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4" enum="TextureChannel"> + Currently unused. </constant> <constant name="EMISSION_OP_ADD" value="0" enum="EmissionOperator"> + Adds the emission color to the color from the emission texture. </constant> <constant name="EMISSION_OP_MULTIPLY" value="1" enum="EmissionOperator"> + Multiplies the emission color by the color from the emission texture. </constant> <constant name="DISTANCE_FADE_DISABLED" value="0" enum="DistanceFadeMode"> + Do not use distance fade. </constant> <constant name="DISTANCE_FADE_PIXEL_ALPHA" value="1" enum="DistanceFadeMode"> + Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel. </constant> <constant name="DISTANCE_FADE_PIXEL_DITHER" value="2" enum="DistanceFadeMode"> + Smoothly fades the object out based on each pixel's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA]. </constant> <constant name="DISTANCE_FADE_OBJECT_DITHER" value="3" enum="DistanceFadeMode"> + Smoothly fades the object out based on the object's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA]. </constant> </constants> </class> diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml index 0dcd174a67..7a4e0c054a 100644 --- a/doc/classes/SpatialVelocityTracker.xml +++ b/doc/classes/SpatialVelocityTracker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpatialVelocityTracker" inherits="Reference" category="Core" version="3.2"> +<class name="SpatialVelocityTracker" inherits="Reference" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml index 6d81d8ff82..439fe11861 100644 --- a/doc/classes/SphereMesh.xml +++ b/doc/classes/SphereMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SphereMesh" inherits="PrimitiveMesh" category="Core" version="3.2"> +<class name="SphereMesh" inherits="PrimitiveMesh" version="4.0"> <brief_description> Class representing a spherical [PrimitiveMesh]. </brief_description> @@ -15,7 +15,7 @@ Full height of the sphere. </member> <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" default="false"> - Determines whether a full sphere or a hemisphere is created. + If [code]true[/code], a hemisphere is created rather than a full sphere. [b]Note:[/b] To get a regular hemisphere, the height and radius of the sphere must be equal. </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml index 616c3b3894..75dab58c38 100644 --- a/doc/classes/SphereShape.xml +++ b/doc/classes/SphereShape.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SphereShape" inherits="Shape" category="Core" version="3.2"> +<class name="SphereShape" inherits="Shape" version="4.0"> <brief_description> Sphere shape for 3D collisions. </brief_description> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index bda0b1192d..3b8bb7fb4b 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpinBox" inherits="Range" category="Core" version="3.2"> +<class name="SpinBox" inherits="Range" version="4.0"> <brief_description> Numerical input text field. </brief_description> @@ -19,6 +19,13 @@ <tutorials> </tutorials> <methods> + <method name="apply"> + <return type="void"> + </return> + <description> + Applies the current value of this [SpinBox]. + </description> + </method> <method name="get_line_edit"> <return type="LineEdit"> </return> diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml index d756c17cef..b3f85ce7e1 100644 --- a/doc/classes/SplitContainer.xml +++ b/doc/classes/SplitContainer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SplitContainer" inherits="Container" category="Core" version="3.2"> +<class name="SplitContainer" inherits="Container" version="4.0"> <brief_description> Container for splitting and adjusting. </brief_description> <description> - Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. + Container for splitting two [Control]s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. </description> <tutorials> </tutorials> @@ -13,16 +13,19 @@ <return type="void"> </return> <description> + Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values. </description> </method> </methods> <members> <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" default="false"> + If [code]true[/code], the area of the first [Control] will be collapsed and the dragger will be disabled. </member> <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility" default="0"> - Determines whether the dragger is visible. + Determines the dragger's visibility. See [enum DraggerVisibility] for details. </member> <member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" default="0"> + The initial offset of the splitting between the two [Control]s, with [code]0[/code] being at the end of the first [Control]. </member> </members> <signals> @@ -36,13 +39,13 @@ </signals> <constants> <constant name="DRAGGER_VISIBLE" value="0" enum="DraggerVisibility"> - The split dragger is visible. + The split dragger is visible when the cursor hovers it. </constant> <constant name="DRAGGER_HIDDEN" value="1" enum="DraggerVisibility"> - The split dragger is invisible. + The split dragger is never visible. </constant> <constant name="DRAGGER_HIDDEN_COLLAPSED" value="2" enum="DraggerVisibility"> - The split dragger is invisible and collapsed. + The split dragger is never visible and its space collapsed. </constant> </constants> </class> diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml index 93aee55b99..351d4f8aff 100644 --- a/doc/classes/SpotLight.xml +++ b/doc/classes/SpotLight.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpotLight" inherits="Light" category="Core" version="3.2"> +<class name="SpotLight" inherits="Light" version="4.0"> <brief_description> A spotlight, such as a reflector spotlight or a lantern. </brief_description> diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm.xml index 133ff68859..f426cfc352 100644 --- a/doc/classes/SpringArm.xml +++ b/doc/classes/SpringArm.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpringArm" inherits="Spatial" category="Core" version="3.2"> +<class name="SpringArm" inherits="Spatial" version="4.0"> <brief_description> A helper node, mostly used in 3rd person cameras. </brief_description> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index b77db1ce9a..5f82f76911 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Sprite" inherits="Node2D" category="Core" version="3.2"> +<class name="Sprite" inherits="Node2D" version="4.0"> <brief_description> General-purpose sprite node. </brief_description> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index e458d4301e..a082a297f8 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.2"> +<class name="Sprite3D" inherits="SpriteBase3D" version="4.0"> <brief_description> 2D sprite node in a 3D world. </brief_description> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 15d5d7beb4..8a923b4521 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.2"> +<class name="SpriteBase3D" inherits="GeometryInstance" version="4.0"> <brief_description> 2D sprite node in 3D environment. </brief_description> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index f28192519e..30690392e9 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SpriteFrames" inherits="Resource" category="Core" version="3.2"> +<class name="SpriteFrames" inherits="Resource" version="4.0"> <brief_description> Sprite frame library for AnimatedSprite. </brief_description> @@ -170,6 +170,7 @@ </methods> <members> <member name="frames" type="Array" setter="_set_frames" getter="_get_frames"> + Compatibility property, always equals to an empty array. </member> </members> <constants> diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml index f8840ddc14..ce7584ecda 100644 --- a/doc/classes/StaticBody.xml +++ b/doc/classes/StaticBody.xml @@ -1,12 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StaticBody" inherits="PhysicsBody" category="Core" version="3.2"> +<class name="StaticBody" inherits="PhysicsBody" version="4.0"> <brief_description> Static body for 3D physics. </brief_description> <description> Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody], they don't consume any CPU resources as long as they don't move. - A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active, the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. - Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). + Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). </description> <tutorials> </tutorials> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 34276ec535..daa160b8a9 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.2"> +<class name="StaticBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> Static body for 2D physics. </brief_description> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 2a1919071a..31742199dd 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StreamPeer" inherits="Reference" category="Core" version="3.2"> +<class name="StreamPeer" inherits="Reference" version="4.0"> <brief_description> Abstraction and base class for stream-based protocols. </brief_description> diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 30a220863d..23e3890fdb 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StreamPeerBuffer" inherits="StreamPeer" category="Core" version="3.2"> +<class name="StreamPeerBuffer" inherits="StreamPeer" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index b34d8d1b25..738d623d02 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.2"> +<class name="StreamPeerSSL" inherits="StreamPeer" version="4.0"> <brief_description> SSL stream peer. </brief_description> @@ -38,6 +38,7 @@ </argument> <description> Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code]. + [b]Note:[/b] Specifying a custom [code]valid_certificate[/code] is not supported in HTML5 exports due to browsers restrictions. </description> </method> <method name="disconnect_from_stream"> diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml index bee026c851..dbd53f8ba0 100644 --- a/doc/classes/StreamPeerTCP.xml +++ b/doc/classes/StreamPeerTCP.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.2"> +<class name="StreamPeerTCP" inherits="StreamPeer" version="4.0"> <brief_description> TCP stream peer. </brief_description> diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml index 9cc3511b68..75e2661db0 100644 --- a/doc/classes/StreamTexture.xml +++ b/doc/classes/StreamTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StreamTexture" inherits="Texture" category="Core" version="3.2"> +<class name="StreamTexture" inherits="Texture" version="4.0"> <brief_description> A [code].stex[/code] texture. </brief_description> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index f5597d89e5..cb80d04f24 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="String" category="Built-In Types" version="3.2"> +<class name="String" version="4.0"> <brief_description> Built-in string class. </brief_description> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index 1d873ef0b1..0e848a1bf6 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StyleBox" inherits="Resource" category="Core" version="3.2"> +<class name="StyleBox" inherits="Resource" version="4.0"> <brief_description> Base class for drawing stylized boxes for the UI. </brief_description> @@ -17,18 +17,22 @@ <argument index="1" name="rect" type="Rect2"> </argument> <description> + Draws this stylebox using a [CanvasItem] with given [RID]. + You can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node. </description> </method> <method name="get_center_size" qualifiers="const"> <return type="Vector2"> </return> <description> + Returns the size of this [StyleBox] without the margins. </description> </method> <method name="get_current_item_drawn" qualifiers="const"> <return type="CanvasItem"> </return> <description> + Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment. </description> </method> <method name="get_default_margin" qualifiers="const"> @@ -37,6 +41,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the default value of the specified [enum Margin]. </description> </method> <method name="get_margin" qualifiers="const"> @@ -45,7 +50,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> - Returns the content margin offset for the specified margin. + Returns the content margin offset for the specified [enum Margin]. Positive values reduce size inwards, unlike [Control]'s margin values. </description> </method> @@ -71,6 +76,7 @@ <argument index="1" name="offset" type="float"> </argument> <description> + Sets the default value of the specified [enum Margin] to given [code]offset[/code] in pixels. </description> </method> <method name="test_mask" qualifiers="const"> diff --git a/doc/classes/StyleBoxEmpty.xml b/doc/classes/StyleBoxEmpty.xml index 9dc8569b75..8781cdcde3 100644 --- a/doc/classes/StyleBoxEmpty.xml +++ b/doc/classes/StyleBoxEmpty.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StyleBoxEmpty" inherits="StyleBox" category="Core" version="3.2"> +<class name="StyleBoxEmpty" inherits="StyleBox" version="4.0"> <brief_description> Empty stylebox (does not display anything). </brief_description> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 05ee79eef2..d6e737b076 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.2"> +<class name="StyleBoxFlat" inherits="StyleBox" version="4.0"> <brief_description> - Customizable Stylebox with a given set of parameters. (no texture required) + Customizable [StyleBox] with a given set of parameters (no texture required). </brief_description> <description> - This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: + This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: - Color - Border width (individual width for each border) - Rounded corners (individual radius for each corner) - - Shadow + - Shadow (with blur and offset) Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: [codeblock] height = 30 @@ -30,12 +30,14 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the given [code]margin[/code]'s border width. See [enum Margin] for possible values. </description> </method> <method name="get_border_width_min" qualifiers="const"> <return type="int"> </return> <description> + Returns the smallest border width out of all four borders. </description> </method> <method name="get_corner_radius" qualifiers="const"> @@ -44,6 +46,7 @@ <argument index="0" name="corner" type="int" enum="Corner"> </argument> <description> + Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values. </description> </method> <method name="get_expand_margin" qualifiers="const"> @@ -52,6 +55,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values. </description> </method> <method name="set_border_width"> @@ -62,6 +66,7 @@ <argument index="1" name="width" type="int"> </argument> <description> + Sets the border width to [code]width[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_border_width_all"> @@ -70,6 +75,7 @@ <argument index="0" name="width" type="int"> </argument> <description> + Sets the border width to [code]width[/code] pixels for all margins. </description> </method> <method name="set_corner_radius"> @@ -80,6 +86,7 @@ <argument index="1" name="radius" type="int"> </argument> <description> + Sets the corner radius to [code]radius[/code] pixels for the given [code]corner[/code]. See [enum Corner] for possible values. </description> </method> <method name="set_corner_radius_all"> @@ -88,6 +95,7 @@ <argument index="0" name="radius" type="int"> </argument> <description> + Sets the corner radius to [code]radius[/code] pixels for all corners. </description> </method> <method name="set_corner_radius_individual"> @@ -102,6 +110,7 @@ <argument index="3" name="radius_bottom_left" type="int"> </argument> <description> + Sets the corner radius for each corner to [code]radius_top_left[/code], [code]radius_top_right[/code], [code]radius_bottom_right[/code], and [code]radius_bottom_left[/code] pixels. </description> </method> <method name="set_expand_margin"> @@ -112,6 +121,7 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_expand_margin_all"> @@ -120,6 +130,7 @@ <argument index="0" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -134,6 +145,7 @@ <argument index="3" name="size_bottom" type="float"> </argument> <description> + Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. </description> </method> </methods> @@ -167,7 +179,8 @@ </member> <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" default="8"> This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account. - For corner radii smaller than 10, 4-5 should be enough. For corner radii smaller than 30, 8-12 should be enough. + For corner radii smaller than 10, [code]4[/code] or [code]5[/code] should be enough. For corner radii smaller than 30, values between [code]8[/code] and [code]12[/code] should be enough. + A corner detail of [code]1[/code] will result in chamfered corners instead of rounded corners, which is useful for some artistic effects. </member> <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0"> The bottom-left corner's radius. If [code]0[/code], the corner is not rounded. diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml index c0745c5f39..4a2dbf60e4 100644 --- a/doc/classes/StyleBoxLine.xml +++ b/doc/classes/StyleBoxLine.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.2"> +<class name="StyleBoxLine" inherits="StyleBox" version="4.0"> <brief_description> + [StyleBox] that displays a single line. </brief_description> <description> + [StyleBox] that displays a single line of a given color and thickness. It can be used to draw things like separators. </description> <tutorials> </tutorials> @@ -10,14 +12,19 @@ </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + The line's color. </member> <member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0"> + The number of pixels the line will extend before the [StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [StyleBoxLine]'s bounds. </member> <member name="grow_end" type="float" setter="set_grow_end" getter="get_grow_end" default="1.0"> + The number of pixels the line will extend past the [StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [StyleBoxLine]'s bounds. </member> <member name="thickness" type="int" setter="set_thickness" getter="get_thickness" default="1"> + The line's thickness in pixels. </member> <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false"> + If [code]true[/code], the line will be vertical. If [code]false[/code], the line will be horizontal. </member> </members> <constants> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index d5efc80846..0e9add964d 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.2"> +<class name="StyleBoxTexture" inherits="StyleBox" version="4.0"> <brief_description> Texture-based nine-patch [StyleBox]. </brief_description> @@ -15,6 +15,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values. </description> </method> <method name="get_margin_size" qualifiers="const"> @@ -23,6 +24,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_expand_margin_all"> @@ -31,6 +33,7 @@ <argument index="0" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -45,6 +48,7 @@ <argument index="3" name="size_bottom" type="float"> </argument> <description> + Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. </description> </method> <method name="set_expand_margin_size"> @@ -55,6 +59,7 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_margin_size"> @@ -65,15 +70,19 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> </methods> <members> <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> + Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values. </member> <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> + Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values. </member> <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true"> + If [code]true[/code], the nine-patch texture's center tile will be drawn. </member> <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. @@ -114,7 +123,7 @@ The normal map to use when drawing this style box. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> - Species a sub region of the texture to use. + Species a sub-region of the texture to use. This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> @@ -124,15 +133,19 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the stylebox's texture is changed. </description> </signal> </signals> <constants> <constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode"> + Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly. </constant> <constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode"> + Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. </constant> <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2" enum="AxisStretchMode"> + Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike [constant AXIS_STRETCH_MODE_TILE], the texture may be slightly stretched to make the nine-patch texture tile seamlessly. </constant> </constants> </class> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 7cfd8c6919..ef9666b5ec 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SurfaceTool" inherits="Reference" category="Core" version="3.2"> +<class name="SurfaceTool" inherits="Reference" version="4.0"> <brief_description> Helper tool to create geometry. </brief_description> @@ -167,13 +167,14 @@ </argument> <description> Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. - Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]Mesh.ARRAY_COMPRESS_*[/code] constants for other flags. + Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags. </description> </method> <method name="commit_to_arrays"> <return type="Array"> </return> <description> + Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API. </description> </method> <method name="create_from"> @@ -197,6 +198,7 @@ <argument index="2" name="blend_shape" type="String"> </argument> <description> + Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape. </description> </method> <method name="deindex"> diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCP_Server.xml index cac3a0b082..72e9ca923d 100644 --- a/doc/classes/TCP_Server.xml +++ b/doc/classes/TCP_Server.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TCP_Server" inherits="Reference" category="Core" version="3.2"> +<class name="TCP_Server" inherits="Reference" version="4.0"> <brief_description> A TCP server. </brief_description> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 1b9f38fc54..ee26be472c 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TabContainer" inherits="Container" category="Core" version="3.2"> +<class name="TabContainer" inherits="Container" version="4.0"> <brief_description> Tabbed container. </brief_description> @@ -144,12 +144,13 @@ If [code]true[/code], tabs can be rearranged with mouse drag. </member> <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign" default="1"> - The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details. + The alignment of all tabs in the tab container. See the [enum TabAlign] constants for details. </member> <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true"> If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. </member> <member name="use_hidden_tabs_for_min_size" type="bool" setter="set_use_hidden_tabs_for_min_size" getter="get_use_hidden_tabs_for_min_size" default="false"> + If [code]true[/code], children [Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one. </member> </members> <signals> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 6bd7b8c2c3..ae455f8043 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Tabs" inherits="Control" category="Core" version="3.2"> +<class name="Tabs" inherits="Control" version="4.0"> <brief_description> Tabs control. </brief_description> @@ -33,6 +33,7 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible. </description> </method> <method name="get_select_with_rmb" qualifiers="const"> @@ -71,6 +72,7 @@ <return type="int"> </return> <description> + Returns the number of hidden tabs offsetted to the left. </description> </method> <method name="get_tab_rect" qualifiers="const"> @@ -179,11 +181,13 @@ If [code]true[/code], tabs can be rearranged with mouse drag. </member> <member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true"> + if [code]true[/code], the mouse's scroll wheel cab be used to navigate the scroll view. </member> <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign" default="1"> - The alignment of all tabs. See enum [code]TabAlign[/code] constants for details. + The alignment of all tabs. See [enum TabAlign] for details. </member> <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy" default="0"> + Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details. </member> </members> <signals> @@ -191,36 +195,42 @@ <argument index="0" name="idx_to" type="int"> </argument> <description> + Emitted when the active tab is rearranged via mouse drag. See [member drag_to_rearrange_enabled]. </description> </signal> <signal name="right_button_pressed"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when a tab is right-clicked. </description> </signal> <signal name="tab_changed"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when switching to another tab. </description> </signal> <signal name="tab_clicked"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when a tab is clicked, even if it is the current tab. </description> </signal> <signal name="tab_close"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when a tab is closed. </description> </signal> <signal name="tab_hover"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when a tab is hovered by the mouse. </description> </signal> </signals> @@ -238,10 +248,13 @@ Represents the size of the [enum TabAlign] enum. </constant> <constant name="CLOSE_BUTTON_SHOW_NEVER" value="0" enum="CloseButtonDisplayPolicy"> + Never show the close buttons. </constant> <constant name="CLOSE_BUTTON_SHOW_ACTIVE_ONLY" value="1" enum="CloseButtonDisplayPolicy"> + Only show the close button on the currently active tab. </constant> <constant name="CLOSE_BUTTON_SHOW_ALWAYS" value="2" enum="CloseButtonDisplayPolicy"> + Show the close button on all tabs. </constant> <constant name="CLOSE_BUTTON_MAX" value="3" enum="CloseButtonDisplayPolicy"> Represents the size of the [enum CloseButtonDisplayPolicy] enum. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 75fceac500..eb3b72f627 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextEdit" inherits="Control" category="Core" version="3.2"> +<class name="TextEdit" inherits="Control" version="4.0"> <brief_description> Multiline text editing control. </brief_description> @@ -315,7 +315,7 @@ [codeblock] var result = search(key, flags, line, column) if result.size() > 0: - # result found + # Result found. var res_line = result[TextEdit.SEARCH_RESULT_LINE] var res_column = result[TextEdit.SEARCH_RESULT_COLUMN] [/codeblock] @@ -437,6 +437,12 @@ <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false"> If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> + <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> + The current horizontal scroll value. + </member> + <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> + The current vertical scroll value. + </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> </member> <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> diff --git a/doc/classes/TextFile.xml b/doc/classes/TextFile.xml index 163900a482..1c2c2ff25c 100644 --- a/doc/classes/TextFile.xml +++ b/doc/classes/TextFile.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextFile" inherits="Resource" category="Core" version="3.2"> +<class name="TextFile" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index 238d6929ba..592f822ecc 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Texture" inherits="Resource" category="Core" version="3.2"> +<class name="Texture" inherits="Resource" version="4.0"> <brief_description> Texture for 2D and 3D. </brief_description> <description> A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. Textures are often created by loading them from a file. See [method @GDScript.load]. + [Texture] is a base for other resources. It cannot be used directly. </description> <tutorials> </tutorials> @@ -24,6 +25,7 @@ <argument index="4" name="normal_map" type="Texture" default="null"> </argument> <description> + Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code]. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at [code]position[/code] and the size of this [Texture]. </description> </method> <method name="draw_rect" qualifiers="const"> @@ -42,6 +44,7 @@ <argument index="5" name="normal_map" type="Texture" default="null"> </argument> <description> + Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect]. </description> </method> <method name="draw_rect_region" qualifiers="const"> @@ -62,12 +65,14 @@ <argument index="6" name="clip_uv" type="bool" default="true"> </argument> <description> + Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region]. </description> </method> <method name="get_data" qualifiers="const"> <return type="Image"> </return> <description> + Returns an [Image] with the data from this [Texture]. [Image]s can be accessed and manipulated directly. </description> </method> <method name="get_height" qualifiers="const"> @@ -95,12 +100,13 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if this [Texture] has an alpha channel. </description> </method> </methods> <members> <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4"> - The texture's flags. + The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture]. </member> </members> <constants> diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml index c11a48137f..bc16cd015f 100644 --- a/doc/classes/Texture3D.xml +++ b/doc/classes/Texture3D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Texture3D" inherits="TextureLayered" category="Core" version="3.2"> +<class name="Texture3D" inherits="TextureLayered" version="4.0"> <brief_description> + Texture with 3 dimensions. </brief_description> <description> + Texture3D is a 3-dimensional texture that has a width, height, and depth. </description> <tutorials> </tutorials> diff --git a/doc/classes/TextureArray.xml b/doc/classes/TextureArray.xml index 0a9ac1fb2e..b652a1c6bc 100644 --- a/doc/classes/TextureArray.xml +++ b/doc/classes/TextureArray.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureArray" inherits="TextureLayered" category="Core" version="3.2"> +<class name="TextureArray" inherits="TextureLayered" version="4.0"> <brief_description> + Array of textures stored in a single primitive. </brief_description> <description> + [TextureArray]s store an array of images in a single [Texture] primitive. Each layer of the texture array has its own mipmap chain. This makes it is a good alternative to texture atlases. </description> <tutorials> </tutorials> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 899ab8b875..be717e9817 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureButton" inherits="BaseButton" category="Core" version="3.2"> +<class name="TextureButton" inherits="BaseButton" version="4.0"> <brief_description> Texture-based button. Supports Pressed, Hover, Disabled and Focused states. </brief_description> @@ -16,7 +16,7 @@ If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="0"> - Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. + Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [enum StretchMode] constants. See the constants to learn more. </member> <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index 232df8f59b..f20f46b6c4 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureLayered" inherits="Resource" category="Core" version="3.2"> +<class name="TextureLayered" inherits="Resource" version="4.0"> <brief_description> + Base class for 3D texture types. </brief_description> <description> + Base class for [Texture3D] and [TextureArray]. Cannot be used directly, but contains all the functions necessary for accessing and using [Texture3D] and [TextureArray]. Data is set on a per-layer basis. For [Texture3D]s, the layer sepcifies the depth or Z-index, they can be treated as a bunch of 2D slices. Similarly, for [TextureArray]s, the layer specifies the array layer. </description> <tutorials> </tutorials> @@ -21,24 +23,28 @@ <argument index="4" name="flags" type="int" default="4"> </argument> <description> + Creates the [Texture3D] or [TextureArray] with specified [code]width[/code], [code]height[/code], and [code]depth[/code]. See [enum Image.Format] for [code]format[/code] options. See [enum Flags] enumerator for [code]flags[/code] options. </description> </method> <method name="get_depth" qualifiers="const"> <return type="int"> </return> <description> + Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis). </description> </method> <method name="get_format" qualifiers="const"> <return type="int" enum="Image.Format"> </return> <description> + Returns the current format being used by this texture. See [enum Image.Format] for details. </description> </method> <method name="get_height" qualifiers="const"> <return type="int"> </return> <description> + Returns the height of the texture. Height is typically represented by the Y-axis. </description> </method> <method name="get_layer_data" qualifiers="const"> @@ -47,12 +53,14 @@ <argument index="0" name="layer" type="int"> </argument> <description> + Returns an [Image] resource with the data from specified [code]layer[/code]. </description> </method> <method name="get_width" qualifiers="const"> <return type="int"> </return> <description> + Returns the width of the texture. Width is typically represented by the X-axis. </description> </method> <method name="set_data_partial"> @@ -69,6 +77,7 @@ <argument index="4" name="mipmap" type="int" default="0"> </argument> <description> + Partially sets the data for a specified [code]layer[/code] by overwriting using the data of the specified [code]image[/code]. [code]x_offset[/code] and [code]y_offset[/code] determine where the [Image] is "stamped" over the texture. The [code]image[/code] must fit within the texture. </description> </method> <method name="set_layer_data"> @@ -79,23 +88,30 @@ <argument index="1" name="layer" type="int"> </argument> <description> + Sets the data for the specified layer. Data takes the form of a 2-dimensional [Image] resource. </description> </method> </methods> <members> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"depth": 0,"flags": 4,"format": 37,"height": 0,"layers": [ ],"width": 0}"> + Returns a dictionary with all the data used by this texture. </member> <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4"> + Specifies which [enum Flags] apply to this texture. </member> </members> <constants> <constant name="FLAG_MIPMAPS" value="1" enum="Flags"> + Texture will generate mipmaps on creation. </constant> <constant name="FLAG_REPEAT" value="2" enum="Flags"> + Texture will repeat when UV used is outside the 0-1 range. </constant> <constant name="FLAG_FILTER" value="4" enum="Flags"> + Use filtering when reading from texture. Filtering smooths out pixels. Turning filtering off is slightly faster and more appropriate when you need access to individual pixels. </constant> <constant name="FLAGS_DEFAULT" value="4" enum="Flags"> + Equivalent to [constant FLAG_FILTER]. </constant> </constants> </class> diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index 479ab865ba..7f91206c2c 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureProgress" inherits="Range" category="Core" version="3.2"> +<class name="TextureProgress" inherits="Range" version="4.0"> <brief_description> Texture-based progress bar. Useful for loading screens and life or stamina bars. </brief_description> @@ -86,7 +86,7 @@ The [member texture_progress] fills from right to left. </constant> <constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode"> - The [member texture_progress] fills from top to bototm. + The [member texture_progress] fills from top to bottom. </constant> <constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode"> The [member texture_progress] fills from bottom to top. diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 997a686e82..17c413c9f2 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextureRect" inherits="Control" category="Core" version="3.2"> +<class name="TextureRect" inherits="Control" version="4.0"> <brief_description> Control for drawing textures. </brief_description> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index dd12c5af23..f9beb5566d 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Theme" inherits="Resource" category="Core" version="3.2"> +<class name="Theme" inherits="Resource" version="4.0"> <brief_description> Theme for controls. </brief_description> @@ -26,7 +26,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the [Color] at [code]name[/code] if the Theme has [code]type[/code]. + Clears the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_constant"> @@ -37,7 +37,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the constant at [code]name[/code] if the Theme has [code]type[/code]. + Clears the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_font"> @@ -48,7 +48,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the [Font] at [code]name[/code] if the Theme has [code]type[/code]. + Clears the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_icon"> @@ -59,7 +59,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the icon at [code]name[/code] if the Theme has [code]type[/code]. + Clears the icon at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_stylebox"> @@ -70,14 +70,14 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. + Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="copy_default_theme"> <return type="void"> </return> <description> - Sets the Theme's values to a copy of the default theme values. + Sets the theme's values to a copy of the default theme values. </description> </method> <method name="copy_theme"> @@ -86,7 +86,7 @@ <argument index="0" name="other" type="Theme"> </argument> <description> - Sets the Theme's values to a copy of a given theme. + Sets the theme's values to a copy of a given theme. </description> </method> <method name="get_color" qualifiers="const"> @@ -97,7 +97,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Color] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> @@ -106,7 +106,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the Theme has [code]type[/code]. + Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. </description> </method> <method name="get_constant" qualifiers="const"> @@ -117,7 +117,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the constant at [code]name[/code] if the Theme has [code]type[/code]. + Returns the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> @@ -126,7 +126,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the Theme has [code]type[/code]. + Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. </description> </method> <method name="get_font" qualifiers="const"> @@ -137,7 +137,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Font] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> @@ -146,7 +146,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the Theme has [code]type[/code]. + Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. </description> </method> <method name="get_icon" qualifiers="const"> @@ -157,7 +157,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [Texture] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the icon [Texture] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> @@ -166,7 +166,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the Theme has [code]type[/code]. + Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox" qualifiers="const"> @@ -177,7 +177,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> @@ -186,14 +186,14 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the Theme has [code]type[/code]. + Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_types" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the Theme has [code]type[/code]. + Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. </description> </method> <method name="get_type_list" qualifiers="const"> @@ -202,7 +202,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if the Theme has [code]type[/code]. + Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. </description> </method> <method name="has_color" qualifiers="const"> @@ -214,7 +214,7 @@ </argument> <description> Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -226,7 +226,7 @@ </argument> <description> Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -238,7 +238,7 @@ </argument> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -250,7 +250,7 @@ </argument> <description> Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -262,7 +262,7 @@ </argument> <description> Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="set_color"> @@ -275,8 +275,8 @@ <argument index="2" name="color" type="Color"> </argument> <description> - Sets the Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_constant"> @@ -289,8 +289,8 @@ <argument index="2" name="constant" type="int"> </argument> <description> - Sets the Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_font"> @@ -303,8 +303,8 @@ <argument index="2" name="font" type="Font"> </argument> <description> - Sets the Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_icon"> @@ -317,8 +317,8 @@ <argument index="2" name="texture" type="Texture"> </argument> <description> - Sets the Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_stylebox"> @@ -331,8 +331,8 @@ <argument index="2" name="texture" type="StyleBox"> </argument> <description> - Sets Theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> </methods> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index 25e40d4c1f..f616a9d9b1 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Thread" inherits="Reference" category="Core" version="3.2"> +<class name="Thread" inherits="Reference" version="4.0"> <brief_description> A unit of execution in a process. </brief_description> @@ -50,10 +50,13 @@ </methods> <constants> <constant name="PRIORITY_LOW" value="0" enum="Priority"> + A thread running with lower priority than normally. </constant> <constant name="PRIORITY_NORMAL" value="1" enum="Priority"> + A thread with a standard priority. </constant> <constant name="PRIORITY_HIGH" value="2" enum="Priority"> + A thread running with higher priority than normally. </constant> </constants> </class> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 7376f624cb..1db1142aa0 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TileMap" inherits="Node2D" category="Core" version="3.2"> +<class name="TileMap" inherits="Node2D" version="4.0"> <brief_description> Node for 2D tile-based maps. </brief_description> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 8ad62f0fcb..7bf5d8a0fe 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TileSet" inherits="Resource" category="Core" version="3.2"> +<class name="TileSet" inherits="Resource" version="4.0"> <brief_description> Tile library for tilemaps. </brief_description> @@ -749,6 +749,8 @@ </constant> <constant name="BIND_LEFT" value="8" enum="AutotileBindings"> </constant> + <constant name="BIND_CENTER" value="16" enum="AutotileBindings"> + </constant> <constant name="BIND_RIGHT" value="32" enum="AutotileBindings"> </constant> <constant name="BIND_BOTTOMLEFT" value="64" enum="AutotileBindings"> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 4f455fb377..c1e5987a06 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Timer" inherits="Node" category="Core" version="3.2"> +<class name="Timer" inherits="Node" version="4.0"> <brief_description> A countdown timer. </brief_description> @@ -37,6 +37,7 @@ <members> <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" default="false"> If [code]true[/code], the timer will automatically start when entering the scene tree. + [b]Note:[/b] This property is automatically set to [code]false[/code] after the timer enters the scene tree and starts. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" default="false"> If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart. @@ -49,7 +50,7 @@ </member> <member name="time_left" type="float" setter="" getter="get_time_left"> The timer's remaining time in seconds. Returns 0 if the timer is inactive. - [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [member wait_time]. + [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [method start]. </member> <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" default="1.0"> Wait time in seconds. diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml index d5edbe3972..f78627b163 100644 --- a/doc/classes/ToolButton.xml +++ b/doc/classes/ToolButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ToolButton" inherits="Button" category="Core" version="3.2"> +<class name="ToolButton" inherits="Button" version="4.0"> <brief_description> Flat button helper class. </brief_description> @@ -21,26 +21,37 @@ </constants> <theme_items> <theme_item name="disabled" type="StyleBox"> + [StyleBox] used when the [ToolButton] is disabled. </theme_item> <theme_item name="focus" type="StyleBox"> + [StyleBox] used when the [ToolButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> <theme_item name="font" type="Font"> + [Font] of the [ToolButton]'s text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default text [Color] of the [ToolButton]. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )"> + Text [Color] used when the [ToolButton] is disabled. </theme_item> <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Text [Color] used when the [ToolButton] is being hovered. </theme_item> <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [ToolButton] is being pressed. </theme_item> <theme_item name="hover" type="StyleBox"> + [StyleBox] used when the [ToolButton] is being hovered. </theme_item> <theme_item name="hseparation" type="int" default="3"> + The horizontal space between [ToolButton]'s icon and text. </theme_item> <theme_item name="normal" type="StyleBox"> + Default [StyleBox] for the [ToolButton]. </theme_item> <theme_item name="pressed" type="StyleBox"> + [StyleBox] used when the [ToolButton] is being pressed. </theme_item> </theme_items> </class> diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index 3d18534a68..52025a1b04 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.2"> +<class name="TouchScreenButton" inherits="Node2D" version="4.0"> <brief_description> Button for touch screen devices. </brief_description> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 034a1b2f5b..e9d7208f66 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Transform" category="Built-In Types" version="3.2"> +<class name="Transform" version="4.0"> <brief_description> 3D transformation (3×4 matrix). </brief_description> @@ -95,6 +95,7 @@ <argument index="0" name="transform" type="Transform"> </argument> <description> + Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="looking_at"> @@ -125,7 +126,7 @@ <argument index="1" name="phi" type="float"> </argument> <description> - Rotates the transform around given axis by phi. The axis must be a normalized vector. + Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector. </description> </method> <method name="scaled"> @@ -134,16 +135,17 @@ <argument index="0" name="scale" type="Vector3"> </argument> <description> - Scales the transform by the specified 3D scaling factors. + Scales the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="translated"> <return type="Transform"> </return> - <argument index="0" name="ofs" type="Vector3"> + <argument index="0" name="offset" type="Vector3"> </argument> <description> - Translates the transform by the specified offset. + Translates the transform by the given offset, relative to the transform's basis vectors. + Unlike [method rotated] and [method scaled], this does not use matrix multiplication. </description> </method> <method name="xform"> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 89ccffc2e9..9719326f59 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Transform2D" category="Built-In Types" version="3.2"> +<class name="Transform2D" version="4.0"> <brief_description> 2D transformation (3×2 matrix). </brief_description> @@ -112,6 +112,7 @@ <argument index="0" name="transform" type="Transform2D"> </argument> <description> + Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="orthonormalized"> @@ -127,7 +128,7 @@ <argument index="0" name="phi" type="float"> </argument> <description> - Rotates the transform by the given angle (in radians). + Rotates the transform by the given angle (in radians), using matrix multiplication. </description> </method> <method name="scaled"> @@ -136,7 +137,7 @@ <argument index="0" name="scale" type="Vector2"> </argument> <description> - Scales the transform by the given factor. + Scales the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="translated"> @@ -145,7 +146,8 @@ <argument index="0" name="offset" type="Vector2"> </argument> <description> - Translates the transform by the given offset. + Translates the transform by the given offset, relative to the transform's basis vectors. + Unlike [method rotated] and [method scaled], this does not use matrix multiplication. </description> </method> <method name="xform"> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index e2599b9695..f80e59f6f9 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Translation" inherits="Resource" category="Core" version="3.2"> +<class name="Translation" inherits="Resource" version="4.0"> <brief_description> Language Translation. </brief_description> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index f43d3bb24e..8a2a8b9768 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TranslationServer" inherits="Object" category="Core" version="3.2"> +<class name="TranslationServer" inherits="Object" version="4.0"> <brief_description> Server that manages all translations. </brief_description> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index e0c8d0b0e8..54aa85ff48 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Tree" inherits="Control" category="Core" version="3.2"> +<class name="Tree" inherits="Control" version="4.0"> <brief_description> Control to show a tree of items. </brief_description> @@ -43,14 +43,18 @@ <argument index="1" name="idx" type="int" default="-1"> </argument> <description> - Create an item in the tree and add it as the last child of [code]parent[/code]. If [code]parent[/code] is [code]null[/code], it will be added as the root's last child, or it'll be the the root itself if the tree is empty. + Creates an item in the tree and adds it as a child of [code]parent[/code]. + If [code]parent[/code] is [code]null[/code], the root item will be the parent, or the new item will be the root itself if the tree is empty. + The new item will be the [code]idx[/code]th child of parent, or it will be the last child if there are not enough siblings. </description> </method> <method name="ensure_cursor_is_visible"> <return type="void"> </return> <description> - Makes the currently selected item visible. This will scroll the tree to make sure the selected item is visible. + Makes the currently focused cell visible. + This will scroll the tree if necessary. In [constant SELECT_ROW] mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically. + [b]Note:[/b] Despite the name of this method, the focus cursor itself is only visible in [constant SELECT_MULTI] mode. </description> </method> <method name="get_column_at_position" qualifiers="const"> @@ -59,7 +63,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Returns the column index under the given point. + Returns the column index at [code]position[/code], or -1 if no item is there. </description> </method> <method name="get_column_title" qualifiers="const"> @@ -93,8 +97,9 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - If [member drop_mode_flags] includes [constant DROP_MODE_INBETWEEN], returns -1 if [code]position[/code] is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if [member drop_mode_flags] includes [constant DROP_MODE_ON_ITEM]. - Otherwise, returns 0. If there are no tree items at [code]position[/code], returns -100. + Returns the drop section at [code]position[/code], or -100 if no item is there. + Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See [enum DropModeFlags] for a description of each drop section. + To get the item which the returned drop section is relative to, use [method get_item_at_position]. </description> </method> <method name="get_edited" qualifiers="const"> @@ -119,7 +124,7 @@ <argument index="1" name="column" type="int" default="-1"> </argument> <description> - Returns the rectangle area for the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. + Returns the rectangle area for the specified item. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. </description> </method> <method name="get_item_at_position" qualifiers="const"> @@ -137,7 +142,8 @@ <argument index="0" name="from" type="Object"> </argument> <description> - Returns the next selected item after the given one. + Returns the next selected item after the given one, or [code]null[/code] if the end is reached. + If [code]from[/code] is [code]null[/code], this returns the first selected item. </description> </method> <method name="get_pressed_button" qualifiers="const"> @@ -151,7 +157,7 @@ <return type="TreeItem"> </return> <description> - Returns the tree's root item. + Returns the tree's root item, or [code]null[/code] if the tree is empty. </description> </method> <method name="get_scroll" qualifiers="const"> @@ -165,14 +171,18 @@ <return type="TreeItem"> </return> <description> - Returns the currently selected item. + Returns the currently focused item, or [code]null[/code] if no item is focused. + In [constant SELECT_ROW] and [constant SELECT_SINGLE] modes, the focused item is same as the selected item. In [constant SELECT_MULTI] mode, the focused item is the item under the focus cursor, not necessarily selected. + To get the currently selected item(s), use [method get_next_selected]. </description> </method> <method name="get_selected_column" qualifiers="const"> <return type="int"> </return> <description> - Returns the current selection's column. + Returns the currently focused column, or -1 if no column is focused. + In [constant SELECT_SINGLE] mode, the focused column is the selected column. In [constant SELECT_ROW] mode, the focused column is always 0 if any item is selected. In [constant SELECT_MULTI] mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected. + To tell whether a column of an item is selected, use [method TreeItem.is_selected]. </description> </method> <method name="set_column_expand"> @@ -229,7 +239,8 @@ The number of columns. </member> <member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0"> - The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. + The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. + This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false"> @@ -240,7 +251,7 @@ </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0"> - Allows single or multiple selection. See the [code]SELECT_*[/code] constants. + Allows single or multiple selection. See the [enum SelectMode] constants. </member> </members> <signals> @@ -278,6 +289,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> + Emitted when the right mouse button is pressed in the empty space of the tree. </description> </signal> <signal name="empty_tree_rmb_selected"> @@ -343,101 +355,144 @@ </signal> <signal name="nothing_selected"> <description> + Emitted when a left mouse button click does not select any item. </description> </signal> </signals> <constants> <constant name="SELECT_SINGLE" value="0" enum="SelectMode"> - Allows selection of a single item at a time. + Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item. + The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item. </constant> <constant name="SELECT_ROW" value="1" enum="SelectMode"> + Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item. + The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item. </constant> <constant name="SELECT_MULTI" value="2" enum="SelectMode"> - Allows selection of multiple items at the same time. + Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item. + The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected. </constant> <constant name="DROP_MODE_DISABLED" value="0" enum="DropModeFlags"> + Disables all drop sections, but still allows to detect the "on item" drop section by [method get_drop_section_at_position]. + [b]Note:[/b] This is the default flag, it has no effect when combined with other flags. </constant> <constant name="DROP_MODE_ON_ITEM" value="1" enum="DropModeFlags"> + Enables the "on item" drop section. This drop section covers the entire item. + When combined with [constant DROP_MODE_INBETWEEN], this drop section halves the height and stays centered vertically. </constant> <constant name="DROP_MODE_INBETWEEN" value="2" enum="DropModeFlags"> + Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half. + When combined with [constant DROP_MODE_ON_ITEM], these drop sections halves the height and stays on top / bottom accordingly. </constant> </constants> <theme_items> <theme_item name="arrow" type="Texture"> + The arrow icon used when a foldable item is not collapsed. </theme_item> <theme_item name="arrow_collapsed" type="Texture"> + The arrow icon used when a foldable item is collapsed. </theme_item> <theme_item name="bg" type="StyleBox"> + Default [StyleBox] for the [Tree], i.e. used when the control is not being focused. </theme_item> <theme_item name="bg_focus" type="StyleBox"> + [StyleBox] used when the [Tree] is being focused. </theme_item> <theme_item name="button_margin" type="int" default="4"> + The horizontal space between each button in a cell. </theme_item> <theme_item name="button_pressed" type="StyleBox"> + [StyleBox] used when a button in the tree is pressed. </theme_item> <theme_item name="checked" type="Texture"> + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. </theme_item> <theme_item name="cursor" type="StyleBox"> - </theme_item> - <theme_item name="cursor_color" type="Color" default="Color( 0, 0, 0, 1 )"> + [StyleBox] used for the cursor, when the [Tree] is being focused. </theme_item> <theme_item name="cursor_unfocused" type="StyleBox"> + [StyleBox] used for the cursor, when the [Tree] is not being focused. </theme_item> <theme_item name="custom_button" type="StyleBox"> + Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. </theme_item> <theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> <theme_item name="custom_button_hover" type="StyleBox"> + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> <theme_item name="custom_button_pressed" type="StyleBox"> + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed. </theme_item> <theme_item name="draw_guides" type="int" default="1"> + Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. </theme_item> <theme_item name="draw_relationship_lines" type="int" default="0"> + Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy. </theme_item> <theme_item name="drop_position_color" type="Color" default="Color( 1, 0.3, 0.2, 1 )"> + [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations. </theme_item> <theme_item name="font" type="Font"> + [Font] of the item's text. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + Default text [Color] of the item. </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the item is selected. </theme_item> <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )"> + [Color] of the guideline. </theme_item> <theme_item name="hseparation" type="int" default="4"> + The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled. </theme_item> <theme_item name="item_margin" type="int" default="12"> + The horizontal margin at the start of an item. This is used when folding is enabled for the item. </theme_item> <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> + [Color] of the relationship lines. </theme_item> <theme_item name="scroll_border" type="int" default="4"> + The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. </theme_item> <theme_item name="scroll_speed" type="int" default="12"> + The speed of border scrolling. </theme_item> <theme_item name="select_arrow" type="Texture"> + The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> <theme_item name="selected" type="StyleBox"> + [StyleBox] for the selected items, used when the [Tree] is not being focused. </theme_item> <theme_item name="selected_focus" type="StyleBox"> - </theme_item> - <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> + [StyleBox] for the selected items, used when the [Tree] is being focused. </theme_item> <theme_item name="title_button_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + Default text [Color] of the title button. </theme_item> <theme_item name="title_button_font" type="Font"> + [Font] of the title button's text. </theme_item> <theme_item name="title_button_hover" type="StyleBox"> + [StyleBox] used when the title button is being hovered. </theme_item> <theme_item name="title_button_normal" type="StyleBox"> + Default [StyleBox] for the title button. </theme_item> <theme_item name="title_button_pressed" type="StyleBox"> + [StyleBox] used when the title button is being pressed. </theme_item> <theme_item name="unchecked" type="Texture"> + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked. </theme_item> <theme_item name="updown" type="Texture"> + The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> <theme_item name="vseparation" type="int" default="4"> + The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. </theme_item> </theme_items> </class> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index c77388e5f4..bd9f8d36b5 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TreeItem" inherits="Object" category="Core" version="3.2"> +<class name="TreeItem" inherits="Object" version="4.0"> <brief_description> Control for a single item inside a [Tree]. </brief_description> @@ -396,7 +396,7 @@ <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode"> </argument> <description> - Sets the given column's cell mode to [code]mode[/code]. See [code]CELL_MODE_*[/code] constants. + Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants. </description> </method> <method name="set_checked"> diff --git a/doc/classes/TriangleMesh.xml b/doc/classes/TriangleMesh.xml index 2125aa5e17..39bee0c2b3 100644 --- a/doc/classes/TriangleMesh.xml +++ b/doc/classes/TriangleMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TriangleMesh" inherits="Reference" category="Core" version="3.2"> +<class name="TriangleMesh" inherits="Reference" version="4.0"> <brief_description> Internal mesh type. </brief_description> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 0f7a93e8d5..e60dc07e99 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Tween" inherits="Node" category="Core" version="3.2"> +<class name="Tween" inherits="Node" version="4.0"> <brief_description> Smoothly animates a node's properties over time. </brief_description> <description> Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them. + [Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node. Here is a brief usage example that causes a 2D node to move smoothly between two positions: [codeblock] var tween = get_node("Tween") @@ -34,9 +35,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -60,9 +61,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -137,9 +138,9 @@ </argument> <argument index="4" name="duration" type="float"> </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="7" name="delay" type="float" default="0"> </argument> @@ -161,9 +162,9 @@ </argument> <argument index="4" name="duration" type="float"> </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="7" name="delay" type="float" default="0"> </argument> @@ -292,9 +293,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -318,9 +319,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -433,10 +434,10 @@ The interpolation starts quickly and slows down towards the end. </constant> <constant name="EASE_IN_OUT" value="2" enum="EaseType"> - A combination of EASE_IN and EASE_OUT. The interpolation is slowest at both ends. + A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends. </constant> <constant name="EASE_OUT_IN" value="3" enum="EaseType"> - A combination of EASE_IN and EASE_OUT. The interpolation is fastest at both ends. + A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends. </constant> </constants> </class> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 7834719af6..06fcb1ca03 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="UndoRedo" inherits="Object" category="Core" version="3.2"> +<class name="UndoRedo" inherits="Object" version="4.0"> <brief_description> Helper to manage undo/redo operations in the editor or custom tools. </brief_description> @@ -32,7 +32,7 @@ </tutorials> <methods> <method name="add_do_method" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="object" type="Object"> </argument> @@ -65,7 +65,7 @@ </description> </method> <method name="add_undo_method" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="object" type="Object"> </argument> diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml index 4709772615..6b32a08f93 100644 --- a/doc/classes/VBoxContainer.xml +++ b/doc/classes/VBoxContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VBoxContainer" inherits="BoxContainer" category="Core" version="3.2"> +<class name="VBoxContainer" inherits="BoxContainer" version="4.0"> <brief_description> Vertical box container. </brief_description> @@ -14,6 +14,7 @@ </constants> <theme_items> <theme_item name="separation" type="int" default="4"> + The vertical space between the [VBoxContainer]'s elements. </theme_item> </theme_items> </class> diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index 6240178b82..dddbbb219b 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VScrollBar" inherits="ScrollBar" category="Core" version="3.2"> +<class name="VScrollBar" inherits="ScrollBar" version="4.0"> <brief_description> - Vertical version of [ScrollBar], which goes from top (min) to bottom (max). + Vertical scroll bar. </brief_description> <description> + Vertical version of [ScrollBar], which goes from top (min) to bottom (max). </description> <tutorials> </tutorials> @@ -17,22 +18,31 @@ </constants> <theme_items> <theme_item name="decrement" type="Texture"> + Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="decrement_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the decrement button. </theme_item> <theme_item name="grabber" type="StyleBox"> + Used as texture for the grabber, the draggable element representing current scroll. </theme_item> <theme_item name="grabber_highlight" type="StyleBox"> + Used when the mouse hovers over the grabber. </theme_item> <theme_item name="grabber_pressed" type="StyleBox"> + Used when the grabber is being dragged. </theme_item> <theme_item name="increment" type="Texture"> + Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> <theme_item name="increment_highlight" type="Texture"> + Displayed when the mouse cursor hovers over the increment button. </theme_item> <theme_item name="scroll" type="StyleBox"> + Used as background of this [ScrollBar]. </theme_item> <theme_item name="scroll_focus" type="StyleBox"> + Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> </class> diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml index e618c2b84b..19e995b9bc 100644 --- a/doc/classes/VSeparator.xml +++ b/doc/classes/VSeparator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VSeparator" inherits="Separator" category="Core" version="3.2"> +<class name="VSeparator" inherits="Separator" version="4.0"> <brief_description> Vertical version of [Separator]. </brief_description> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index fc62e5c892..9e0b2e0453 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VSlider" inherits="Slider" category="Core" version="3.2"> +<class name="VSlider" inherits="Slider" version="4.0"> <brief_description> Vertical slider. </brief_description> @@ -17,20 +17,14 @@ <constants> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> - </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> <theme_item name="grabber_disabled" type="Texture"> </theme_item> - <theme_item name="grabber_disabled" type="StyleBox"> - </theme_item> <theme_item name="grabber_highlight" type="Texture"> </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> - </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> <theme_item name="tick" type="Texture"> diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index da2a54dca0..2dba120a4f 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VSplitContainer" inherits="SplitContainer" category="Core" version="3.2"> +<class name="VSplitContainer" inherits="SplitContainer" version="4.0"> <brief_description> Vertical split container. </brief_description> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index 9d55f5846f..042c8d8e67 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Variant" category="Core" version="3.2"> +<class name="Variant" version="4.0"> <brief_description> The most important data type in Godot. </brief_description> @@ -17,7 +17,7 @@ - VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time. - C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept. - The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects. - The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable. These correspond to [code]TYPE_*[/code] constants in the [@GlobalScope] docs. + The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]). [codeblock] var foo = 2 match typeof(foo): diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 8ae5caf68c..4eef103d1f 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Vector2" category="Built-In Types" version="3.2"> +<class name="Vector2" version="4.0"> <brief_description> Vector used for 2D math. </brief_description> @@ -159,6 +159,7 @@ <argument index="0" name="v" type="Vector2"> </argument> <description> + Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_normalized"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 29c24709e2..7ae89cc450 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Vector3" category="Built-In Types" version="3.2"> +<class name="Vector3" version="4.0"> <brief_description> Vector used for 3D math. </brief_description> @@ -135,6 +135,7 @@ <argument index="0" name="v" type="Vector3"> </argument> <description> + Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_normalized"> diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml index 1803d4e197..74879419a1 100644 --- a/doc/classes/VehicleBody.xml +++ b/doc/classes/VehicleBody.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VehicleBody" inherits="RigidBody" category="Core" version="3.2"> +<class name="VehicleBody" inherits="RigidBody" version="4.0"> <brief_description> Physics body that simulates the behavior of a car. </brief_description> diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml index ff6004bcba..1a6a226fd1 100644 --- a/doc/classes/VehicleWheel.xml +++ b/doc/classes/VehicleWheel.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VehicleWheel" inherits="Spatial" category="Core" version="3.2"> +<class name="VehicleWheel" inherits="Spatial" version="4.0"> <brief_description> Physics object that simulates the behavior of a wheel. </brief_description> @@ -75,7 +75,7 @@ This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. </member> <member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence" default="0.1"> - This value affects the roll of your vehicle. If set to 0.0 for all wheels, your vehicle will be prone to rolling over, while a value of 1.0 will resist body roll. + This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. </member> </members> <constants> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 804489f7f1..73c5a1d232 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VideoPlayer" inherits="Control" category="Core" version="3.2"> +<class name="VideoPlayer" inherits="Control" version="4.0"> <brief_description> Control for playing video streams. </brief_description> <description> - Control node for playing video streams. Supported formats are [url=https://www.webmproject.org/]WebM[/url] and [url=https://www.theora.org/]Ogg Theora[/url]. + Control node for playing video streams using [VideoStream] resources. + Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative]. </description> <tutorials> </tutorials> @@ -13,7 +14,7 @@ <return type="String"> </return> <description> - Returns the video stream's name. + Returns the video stream's name, or [code]"<No Stream>"[/code] if no video stream is assigned. </description> </method> <method name="get_video_texture" qualifiers="const"> @@ -28,20 +29,22 @@ </return> <description> Returns [code]true[/code] if the video is playing. + [b]Note:[/b] The video is still considered playing if paused during playback. </description> </method> <method name="play"> <return type="void"> </return> <description> - Starts the video playback. + Starts the video playback from the beginning. If the video is paused, this will not unpause the video. </description> </method> <method name="stop"> <return type="void"> </return> <description> - Stops the video playback. + Stops the video playback and sets the stream position to 0. + [b]Note:[/b] Although the stream position will be set to 0, the first frame of the video stream won't become the current frame. </description> </method> </methods> @@ -59,7 +62,7 @@ Audio bus to use for sound playback. </member> <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true"> - If [code]true[/code], the video scales to the control size. + If [code]true[/code], the video scales to the control size. Otherwise, the control minimum size will be automatically adjusted to match the video stream's dimensions. </member> <member name="paused" type="bool" setter="set_paused" getter="is_paused" default="false"> If [code]true[/code], the video is paused. diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml index 7772c61e85..7f522bfdf0 100644 --- a/doc/classes/VideoStream.xml +++ b/doc/classes/VideoStream.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VideoStream" inherits="Resource" category="Core" version="3.2"> +<class name="VideoStream" inherits="Resource" version="4.0"> <brief_description> Base resource for video streams. </brief_description> <description> + Base resource type for all video streams. Classes that derive from [VideoStream] can all be used as resource types to play back videos in [VideoPlayer]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 9bc46881f9..3c6ff1939e 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Viewport" inherits="Node" category="Core" version="3.2"> +<class name="Viewport" inherits="Node" version="4.0"> <brief_description> Creates a sub-view into the screen. </brief_description> @@ -73,6 +73,7 @@ <argument index="0" name="quadrant" type="int"> </argument> <description> + Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant. </description> </method> <method name="get_size_override" qualifiers="const"> @@ -126,6 +127,7 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the viewport is currently performing a drag operation. </description> </method> <method name="input"> @@ -155,12 +157,14 @@ <argument index="0" name="rect" type="Rect2"> </argument> <description> + Attaches this [Viewport] to the root [Viewport] with the specified rectangle. This bypasses the need for another node to display this [Viewport] but makes you responsible for updating the position of this [Viewport] manually. </description> </method> <method name="set_input_as_handled"> <return type="void"> </return> <description> + Stops the input from propagating further down the [SceneTree]. </description> </method> <method name="set_shadow_atlas_quadrant_subdiv"> @@ -171,6 +175,7 @@ <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv"> </argument> <description> + Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible. </description> </method> <method name="set_size_override"> @@ -242,13 +247,13 @@ <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true"> </member> <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" default="true"> - If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. + If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot HDR uses 16 bits, meaning it does not store the full range of a floating point number. </member> <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear" default="false"> If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. </member> <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0"> - The multisample anti-aliasing mode. + The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems. </member> <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" default="false"> If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property. @@ -269,16 +274,16 @@ If [code]true[/code], the result of rendering will be flipped vertically. </member> <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> - The subdivision amount of first quadrant on shadow atlas. + The subdivision amount of the first quadrant on the shadow atlas. </member> <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> - The subdivision amount of second quadrant on shadow atlas. + The subdivision amount of the second quadrant on the shadow atlas. </member> <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3"> - The subdivision amount of third quadrant on shadow atlas. + The subdivision amount of the third quadrant on the shadow atlas. </member> <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4"> - The subdivision amount of fourth quadrant on shadow atlas. + The subdivision amount of the fourth quadrant on the shadow atlas. </member> <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0"> The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2. @@ -304,6 +309,13 @@ </member> </members> <signals> + <signal name="gui_focus_changed"> + <argument index="0" name="node" type="Control"> + </argument> + <description> + Emitted when a Control node grabs keyboard focus. + </description> + </signal> <signal name="size_changed"> <description> Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means. @@ -324,18 +336,25 @@ Always update the render target. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv"> + This quadrant will not be used. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv"> + This quadrant will only be used by one shadow map. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv"> + This quadrant will be split in 4 and used by up to 4 shadow maps. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="ShadowAtlasQuadrantSubdiv"> + This quadrant will be split 16 ways and used by up to 16 shadow maps. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="ShadowAtlasQuadrantSubdiv"> + This quadrant will be split 64 ways and used by up to 64 shadow maps. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="ShadowAtlasQuadrantSubdiv"> + This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="ShadowAtlasQuadrantSubdiv"> + This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution. </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv"> Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum. @@ -377,20 +396,28 @@ Multisample anti-aliasing mode disabled. This is the default value. </constant> <constant name="MSAA_2X" value="1" enum="MSAA"> + Use 2x Multisample Antialiasing. </constant> <constant name="MSAA_4X" value="2" enum="MSAA"> + Use 4x Multisample Antialiasing. </constant> <constant name="MSAA_8X" value="3" enum="MSAA"> + Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware. </constant> <constant name="MSAA_16X" value="4" enum="MSAA"> + Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware. </constant> <constant name="USAGE_2D" value="0" enum="Usage"> + Allocates all buffers needed for drawing 2D scenes. This takes less VRAM than the 3D usage modes. </constant> <constant name="USAGE_2D_NO_SAMPLING" value="1" enum="Usage"> + Allocates buffers needed for 2D scenes without allocating a buffer for screen copy. Accordingly, you cannot read from the screen. Of the [enum Usage] types, this requires the least VRAM. </constant> <constant name="USAGE_3D" value="2" enum="Usage"> + Allocates full buffers for drawing 3D scenes and all 3D effects including buffers needed for 2D scenes and effects. </constant> <constant name="USAGE_3D_NO_EFFECTS" value="3" enum="Usage"> + Allocates buffers needed for drawing 3D scenes. But does not allocate buffers needed for reading from the screen and post-processing effects. Saves some VRAM. </constant> <constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode"> Always clear the render target before drawing. diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml index e4c6091909..d2fbb85305 100644 --- a/doc/classes/ViewportContainer.xml +++ b/doc/classes/ViewportContainer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ViewportContainer" inherits="Container" category="Core" version="3.2"> +<class name="ViewportContainer" inherits="Container" version="4.0"> <brief_description> Control for holding [Viewport]s. </brief_description> @@ -15,6 +15,9 @@ If [code]true[/code], the viewport will be scaled to the control's size. </member> <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1"> + Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering. + For example, a 1280×720 viewport with [member stretch_shrink] set to [code]2[/code] will be rendered at 640×360 while occupying the same size in the container. + [b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work. </member> </members> <constants> diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml index f4994699a3..e65d44f0f4 100644 --- a/doc/classes/ViewportTexture.xml +++ b/doc/classes/ViewportTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ViewportTexture" inherits="Texture" category="Core" version="3.2"> +<class name="ViewportTexture" inherits="Texture" version="4.0"> <brief_description> Texture which displays the content of a [Viewport]. </brief_description> diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml index e3c7d05fce..82b952fda6 100644 --- a/doc/classes/VisibilityEnabler.xml +++ b/doc/classes/VisibilityEnabler.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.2"> +<class name="VisibilityEnabler" inherits="VisibilityNotifier" version="4.0"> <brief_description> Enables certain nodes only when visible. </brief_description> @@ -15,6 +15,7 @@ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler"> </argument> <description> + Returns whether the enabler identified by given [enum Enabler] constant is active. </description> </method> <method name="set_enabler"> @@ -25,6 +26,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Sets active state of the enabler identified by given [enum Enabler] constant. </description> </method> </methods> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index 96f6a42cdf..98c3e5d78d 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.2"> +<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" version="4.0"> <brief_description> Enables certain nodes only when visible. </brief_description> @@ -15,6 +15,7 @@ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler"> </argument> <description> + Returns whether the enabler identified by given [enum Enabler] constant is active. </description> </method> <method name="set_enabler"> @@ -25,6 +26,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Sets active state of the enabler identified by given [enum Enabler] constant. </description> </method> </methods> @@ -65,6 +67,7 @@ This enabler will stop the parent's _physics_process function. </constant> <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5" enum="Enabler"> + This enabler will stop [AnimatedSprite] nodes animations. </constant> <constant name="ENABLER_MAX" value="6" enum="Enabler"> Represents the size of the [enum Enabler] enum. diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml index 4cbfa7ba76..6161017884 100644 --- a/doc/classes/VisibilityNotifier.xml +++ b/doc/classes/VisibilityNotifier.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityNotifier" inherits="Spatial" category="Core" version="3.2"> +<class name="VisibilityNotifier" inherits="Spatial" version="4.0"> <brief_description> Detects when the node is visible on screen. </brief_description> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index 7e1d933c44..f2a4a59d77 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisibilityNotifier2D" inherits="Node2D" category="Core" version="3.2"> +<class name="VisibilityNotifier2D" inherits="Node2D" version="4.0"> <brief_description> Detects when the node is visible on screen. </brief_description> diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml index 7576bf7ad8..1bbd5cb64d 100644 --- a/doc/classes/VisualInstance.xml +++ b/doc/classes/VisualInstance.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualInstance" inherits="Spatial" category="Core" version="3.2"> +<class name="VisualInstance" inherits="Spatial" version="4.0"> <brief_description> + Parent of all visual 3D nodes. </brief_description> <description> + The [VisualInstance] is used to connect a resource to a visual representation. All visual 3D nodes inherit from the [VisualInstance]. In general, you should not access the [VisualInstance] properties directly as they are accessed and managed by the nodes that inherit from [VisualInstance]. [VisualInstance] is the node representation of the [VisualServer] instance. </description> <tutorials> </tutorials> @@ -11,19 +13,21 @@ <return type="AABB"> </return> <description> - Returns the [AABB] (also known as the bounding box) for this VisualInstance. + Returns the [AABB] (also known as the bounding box) for this [VisualInstance]. </description> </method> <method name="get_base" qualifiers="const"> <return type="RID"> </return> <description> + Returns the RID of the resource associated with this [VisualInstance]. For example, if the Node is a [MeshInstance], this will return the RID of the associated [Mesh]. </description> </method> <method name="get_instance" qualifiers="const"> <return type="RID"> </return> <description> + Returns the RID of this instance. This RID is the same as the RID returned by [method VisualServer.instance_create]. This RID is needed if you want to call [VisualServer] functions directly on this [VisualInstance]. </description> </method> <method name="get_layer_mask_bit" qualifiers="const"> @@ -32,14 +36,15 @@ <argument index="0" name="layer" type="int"> </argument> <description> + Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. </description> </method> <method name="get_transformed_aabb" qualifiers="const"> <return type="AABB"> </return> <description> - Returns the transformed [AABB] (also known as the bounding box) for this VisualInstance. - Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Spatial]s [Transform] + Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance]. + Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Spatial]'s [Transform]. </description> </method> <method name="set_base"> @@ -48,8 +53,7 @@ <argument index="0" name="base" type="RID"> </argument> <description> - Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood. - It is recommended to only use [method set_base] if you know what you're doing. + Sets the resource that is instantiated by this [VisualInstance], which changes how the engine handles the [VisualInstance] under the hood. Equivalent to [method VisualServer.instance_set_base]. </description> </method> <method name="set_layer_mask_bit"> @@ -60,13 +64,14 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables a particular layer in [member layers]. </description> </method> </methods> <members> <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" default="1"> - The render layer(s) this VisualInstance is drawn on. - This object will only be visible for [Camera]s whose cull mask includes the render object this VisualInstance is set to. + The render layer(s) this [VisualInstance] is drawn on. + This object will only be visible for [Camera]s whose cull mask includes the render object this [VisualInstance] is set to. </member> </members> <constants> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 895aba2473..2a830abcb2 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -1,13 +1,21 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualServer" inherits="Object" category="Core" version="3.2"> +<class name="VisualServer" inherits="Object" version="4.0"> <brief_description> Server for anything visible. </brief_description> <description> Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + The visual server can be used to bypass the scene system entirely. + Resources are created using the [code]*_create[/code] functions. + All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. + In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Spatial] node with [method Spatial.get_world]. Otherwise, a scenario can be created with [method scenario_create]. + Similarly in 2D, a canvas is needed to draw all canvas items. + In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. + In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link> </tutorials> <methods> <method name="black_bars_set_images"> @@ -44,6 +52,8 @@ <return type="RID"> </return> <description> + Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="camera_set_cull_mask"> @@ -54,6 +64,7 @@ <argument index="1" name="layers" type="int"> </argument> <description> + Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera.cull_mask]. </description> </method> <method name="camera_set_environment"> @@ -64,6 +75,7 @@ <argument index="1" name="env" type="RID"> </argument> <description> + Sets the environment used by this camera. Equivalent to [member Camera.environment]. </description> </method> <method name="camera_set_frustum"> @@ -80,6 +92,7 @@ <argument index="4" name="z_far" type="float"> </argument> <description> + Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects. </description> </method> <method name="camera_set_orthogonal"> @@ -94,6 +107,7 @@ <argument index="3" name="z_far" type="float"> </argument> <description> + Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. </description> </method> <method name="camera_set_perspective"> @@ -108,6 +122,7 @@ <argument index="3" name="z_far" type="float"> </argument> <description> + Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. </description> </method> <method name="camera_set_transform"> @@ -118,6 +133,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets [Transform] of camera. </description> </method> <method name="camera_set_use_vertical_aspect"> @@ -128,13 +144,15 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT]. </description> </method> <method name="canvas_create"> <return type="RID"> </return> <description> - Creates a canvas and returns the assigned [RID]. + Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_add_circle"> @@ -198,6 +216,7 @@ <argument index="5" name="normal_map" type="RID"> </argument> <description> + Adds a mesh command to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_add_multimesh"> @@ -411,7 +430,12 @@ </argument> <argument index="9" name="normal_map" type="RID"> </argument> + <argument index="10" name="antialiased" type="bool" default="false"> + </argument> + <argument index="11" name="antialiasing_use_indices" type="bool" default="false"> + </argument> <description> + Adds a triangle array to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_clear"> @@ -427,7 +451,8 @@ <return type="RID"> </return> <description> - Creates a new [CanvasItem] and returns its [RID]. + Creates a new [CanvasItem] and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_set_clip"> @@ -475,6 +500,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables the use of distance fields for GUI elements that are rendering distance field based fonts. </description> </method> <method name="canvas_item_set_draw_behind_parent"> @@ -540,7 +566,7 @@ <argument index="1" name="parent" type="RID"> </argument> <description> - Sets the parent for the [CanvasItem]. + Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport. </description> </method> <method name="canvas_item_set_self_modulate"> @@ -635,7 +661,8 @@ <return type="RID"> </return> <description> - Creates a canvas light. + Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_attach_to_canvas"> @@ -653,7 +680,8 @@ <return type="RID"> </return> <description> - Creates a light occluder. + Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_set_enabled"> @@ -787,7 +815,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode"> </argument> <description> - The mode of the light, see [code]CANVAS_LIGHT_MODE_*[/code] constants. + The mode of the light, see [enum CanvasLightMode] constants. </description> </method> <method name="canvas_light_set_scale"> @@ -798,6 +826,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale]. </description> </method> <method name="canvas_light_set_shadow_buffer_size"> @@ -841,7 +870,7 @@ <argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter"> </argument> <description> - Sets the canvas light's shadow's filter, see [code]CANVAS_LIGHT_SHADOW_FILTER_*[/code] constants. + Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. </description> </method> <method name="canvas_light_set_shadow_gradient_length"> @@ -874,6 +903,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Sets texture to be used by light. Equivalent to [member Light2D.texture]. </description> </method> <method name="canvas_light_set_texture_offset"> @@ -884,6 +914,7 @@ <argument index="1" name="offset" type="Vector2"> </argument> <description> + Sets the offset of the light's texture. Equivalent to [member Light2D.offset]. </description> </method> <method name="canvas_light_set_transform"> @@ -907,13 +938,15 @@ <argument index="2" name="max_z" type="int"> </argument> <description> + Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]. </description> </method> <method name="canvas_occluder_polygon_create"> <return type="RID"> </return> <description> - Creates a new light occluder polygon. + Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_occluder_polygon_set_cull_mode"> @@ -924,7 +957,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode"> </argument> <description> - Sets an occluder polygons cull mode. See [code]CANVAS_OCCLUDER_POLYGON_CULL_MODE_*[/code] constants. + Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. </description> </method> <method name="canvas_occluder_polygon_set_shape"> @@ -979,6 +1012,9 @@ <return type="RID"> </return> <description> + Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="draw"> @@ -989,12 +1025,15 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead. </description> </method> <method name="environment_create"> <return type="RID"> </return> <description> + Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="environment_set_adjustment"> @@ -1013,6 +1052,7 @@ <argument index="5" name="ramp" type="RID"> </argument> <description> + Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ambient_light"> @@ -1027,6 +1067,7 @@ <argument index="3" name="sky_contibution" type="float" default="0.0"> </argument> <description> + Sets the ambient light parameters. See [Environment] for more details. </description> </method> <method name="environment_set_background"> @@ -1037,6 +1078,7 @@ <argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG"> </argument> <description> + Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]. </description> </method> <method name="environment_set_bg_color"> @@ -1047,6 +1089,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). </description> </method> <method name="environment_set_bg_energy"> @@ -1057,6 +1100,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the intensity of the background color. </description> </method> <method name="environment_set_canvas_max_layer"> @@ -1067,6 +1111,7 @@ <argument index="1" name="max_layer" type="int"> </argument> <description> + Sets the maximum layer to use if using Canvas background mode. </description> </method> <method name="environment_set_dof_blur_far"> @@ -1085,6 +1130,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Far Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_dof_blur_near"> @@ -1103,6 +1149,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Near Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog"> @@ -1119,6 +1166,7 @@ <argument index="4" name="sun_amount" type="float"> </argument> <description> + Sets the variables to be used with the scene fog. See [Environment] for more details. </description> </method> <method name="environment_set_fog_depth"> @@ -1139,6 +1187,7 @@ <argument index="6" name="transmit_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog depth effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog_height"> @@ -1155,6 +1204,7 @@ <argument index="4" name="height_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog height effect. See [Environment] for more details. </description> </method> <method name="environment_set_glow"> @@ -1183,6 +1233,7 @@ <argument index="10" name="bicubic_upscale" type="bool"> </argument> <description> + Sets the variables to be used with the "glow" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_sky"> @@ -1193,6 +1244,7 @@ <argument index="1" name="sky" type="RID"> </argument> <description> + Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky]. </description> </method> <method name="environment_set_sky_custom_fov"> @@ -1203,6 +1255,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov]. </description> </method> <method name="environment_set_sky_orientation"> @@ -1213,6 +1266,7 @@ <argument index="1" name="orientation" type="Basis"> </argument> <description> + Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation]. </description> </method> <method name="environment_set_ssao"> @@ -1245,6 +1299,7 @@ <argument index="12" name="bilateral_sharpness" type="float"> </argument> <description> + Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssr"> @@ -1265,6 +1320,7 @@ <argument index="6" name="roughness" type="bool"> </argument> <description> + Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_tonemap"> @@ -1289,6 +1345,7 @@ <argument index="8" name="auto_exp_grey" type="float"> </argument> <description> + Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. </description> </method> <method name="finish"> @@ -1306,6 +1363,7 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution. </description> </method> <method name="force_sync"> @@ -1330,7 +1388,7 @@ <argument index="0" name="info" type="int" enum="VisualServer.RenderInfo"> </argument> <description> - Returns a certain information, see [code]RENDER_INFO_*[/code] for options. + Returns a certain information, see [enum RenderInfo] for options. </description> </method> <method name="get_test_cube"> @@ -1347,6 +1405,22 @@ Returns the id of the test texture. Creates one if none exists. </description> </method> + <method name="get_video_adapter_name" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> + <method name="get_video_adapter_vendor" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). + [b]Note:[/b] When running a headless or server binary, this function returns an empty string. + </description> + </method> <method name="get_white_texture"> <return type="RID"> </return> @@ -1358,6 +1432,9 @@ <return type="RID"> </return> <description> + Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]gi_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this GI probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="gi_probe_get_bias" qualifiers="const"> @@ -1366,6 +1443,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]. </description> </method> <method name="gi_probe_get_bounds" qualifiers="const"> @@ -1374,6 +1452,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the axis-aligned bounding box that covers the full extent of the GI probe. </description> </method> <method name="gi_probe_get_cell_size" qualifiers="const"> @@ -1382,6 +1461,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the cell size set by [method gi_probe_set_cell_size]. </description> </method> <method name="gi_probe_get_dynamic_data" qualifiers="const"> @@ -1390,6 +1470,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the data used by the GI probe. </description> </method> <method name="gi_probe_get_dynamic_range" qualifiers="const"> @@ -1398,6 +1479,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]. </description> </method> <method name="gi_probe_get_energy" qualifiers="const"> @@ -1406,6 +1488,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]. </description> </method> <method name="gi_probe_get_normal_bias" qualifiers="const"> @@ -1414,6 +1497,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]. </description> </method> <method name="gi_probe_get_propagation" qualifiers="const"> @@ -1422,6 +1506,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_get_to_cell_xform" qualifiers="const"> @@ -1430,6 +1515,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the Transform set by [method gi_probe_set_to_cell_xform]. </description> </method> <method name="gi_probe_is_compressed" qualifiers="const"> @@ -1438,6 +1524,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]. </description> </method> <method name="gi_probe_is_interior" qualifiers="const"> @@ -1446,6 +1533,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns [code]true[/code] if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior]. </description> </method> <method name="gi_probe_set_bias"> @@ -1456,6 +1544,7 @@ <argument index="1" name="bias" type="float"> </argument> <description> + Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]. </description> </method> <method name="gi_probe_set_bounds"> @@ -1466,6 +1555,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the axis-aligned bounding box that covers the extent of the GI probe. </description> </method> <method name="gi_probe_set_cell_size"> @@ -1476,6 +1566,7 @@ <argument index="1" name="range" type="float"> </argument> <description> + Sets the size of individual cells within the GI probe. </description> </method> <method name="gi_probe_set_compress"> @@ -1486,6 +1577,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress]. </description> </method> <method name="gi_probe_set_dynamic_data"> @@ -1496,6 +1588,7 @@ <argument index="1" name="data" type="PoolIntArray"> </argument> <description> + Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself. </description> </method> <method name="gi_probe_set_dynamic_range"> @@ -1506,6 +1599,7 @@ <argument index="1" name="range" type="int"> </argument> <description> + Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range]. </description> </method> <method name="gi_probe_set_energy"> @@ -1516,6 +1610,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy]. </description> </method> <method name="gi_probe_set_interior"> @@ -1526,6 +1621,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior]. </description> </method> <method name="gi_probe_set_normal_bias"> @@ -1536,6 +1632,7 @@ <argument index="1" name="bias" type="float"> </argument> <description> + Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias]. </description> </method> <method name="gi_probe_set_propagation"> @@ -1546,6 +1643,7 @@ <argument index="1" name="propagation" type="float"> </argument> <description> + Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_set_to_cell_xform"> @@ -1556,6 +1654,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the to cell [Transform] for this GI probe. </description> </method> <method name="has_changed" qualifiers="const"> @@ -1571,6 +1670,7 @@ <argument index="0" name="feature" type="int" enum="VisualServer.Features"> </argument> <description> + Not yet implemented. Always returns [code]false[/code]. </description> </method> <method name="has_os_feature" qualifiers="const"> @@ -1579,7 +1679,7 @@ <argument index="0" name="feature" type="String"> </argument> <description> - Returns [code]true[/code] if the OS supports a certain feature. Features might be s3tc, etc, etc2 and pvrtc, + 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"> @@ -1592,6 +1692,7 @@ <argument index="2" name="texture" type="RID"> </argument> <description> + Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin]. </description> </method> <method name="immediate_clear"> @@ -1600,6 +1701,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear]. </description> </method> <method name="immediate_color"> @@ -1610,12 +1712,16 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color]. </description> </method> <method name="immediate_create"> <return type="RID"> </return> <description> + Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="immediate_end"> @@ -1624,6 +1730,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end]. </description> </method> <method name="immediate_get_material" qualifiers="const"> @@ -1632,6 +1739,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Returns the material assigned to the [ImmediateGeometry]. </description> </method> <method name="immediate_normal"> @@ -1642,6 +1750,7 @@ <argument index="1" name="normal" type="Vector3"> </argument> <description> + Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal]. </description> </method> <method name="immediate_set_material"> @@ -1652,6 +1761,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets the material to be used to draw the [ImmediateGeometry]. </description> </method> <method name="immediate_tangent"> @@ -1662,6 +1772,7 @@ <argument index="1" name="tangent" type="Plane"> </argument> <description> + Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent]. </description> </method> <method name="immediate_uv"> @@ -1672,6 +1783,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv]. </description> </method> <method name="immediate_uv2"> @@ -1682,6 +1794,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2]. </description> </method> <method name="immediate_vertex"> @@ -1692,6 +1805,7 @@ <argument index="1" name="vertex" type="Vector3"> </argument> <description> + Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="immediate_vertex_2d"> @@ -1702,13 +1816,14 @@ <argument index="1" name="vertex" type="Vector2"> </argument> <description> + Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="init"> <return type="void"> </return> <description> - Initializes the visual server. + Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. </description> </method> <method name="instance_attach_object_instance_id"> @@ -1719,6 +1834,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]. </description> </method> <method name="instance_attach_skeleton"> @@ -1729,12 +1845,16 @@ <argument index="1" name="skeleton" type="RID"> </argument> <description> + Attaches a skeleton to an instance. Removes the previous skeleton from the instance. </description> </method> <method name="instance_create"> <return type="RID"> </return> <description> + Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]. </description> </method> <method name="instance_create2"> @@ -1745,6 +1865,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="instance_geometry_set_as_instance_lod"> @@ -1755,6 +1877,7 @@ <argument index="1" name="as_lod_of_instance" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_cast_shadows_setting"> @@ -1765,6 +1888,7 @@ <argument index="1" name="shadow_casting_setting" type="int" enum="VisualServer.ShadowCastingSetting"> </argument> <description> + Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow]. </description> </method> <method name="instance_geometry_set_draw_range"> @@ -1781,6 +1905,7 @@ <argument index="4" name="max_margin" type="float"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_flag"> @@ -1793,6 +1918,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> + Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. </description> </method> <method name="instance_geometry_set_material_override"> @@ -1803,6 +1929,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override]. </description> </method> <method name="instance_set_base"> @@ -1813,6 +1940,7 @@ <argument index="1" name="base" type="RID"> </argument> <description> + Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. </description> </method> <method name="instance_set_blend_shape_weight"> @@ -1825,6 +1953,7 @@ <argument index="2" name="weight" type="float"> </argument> <description> + Sets the weight for a given blend shape associated with this instance. </description> </method> <method name="instance_set_custom_aabb"> @@ -1835,6 +1964,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb]. </description> </method> <method name="instance_set_exterior"> @@ -1845,6 +1975,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Function not implemented in Godot 3.x. </description> </method> <method name="instance_set_extra_visibility_margin"> @@ -1855,6 +1986,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> + Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin]. </description> </method> <method name="instance_set_layer_mask"> @@ -1865,6 +1997,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers]. </description> </method> <method name="instance_set_scenario"> @@ -1875,6 +2008,7 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. </description> </method> <method name="instance_set_surface_material"> @@ -1887,6 +2021,7 @@ <argument index="2" name="material" type="RID"> </argument> <description> + Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material]. </description> </method> <method name="instance_set_transform"> @@ -1897,6 +2032,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the world space transform of the instance. Equivalent to [member Spatial.transform]. </description> </method> <method name="instance_set_use_lightmap"> @@ -1909,6 +2045,7 @@ <argument index="2" name="lightmap" type="RID"> </argument> <description> + Sets the lightmap to use with this instance. </description> </method> <method name="instance_set_visible"> @@ -1919,6 +2056,7 @@ <argument index="1" name="visible" type="bool"> </argument> <description> + Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible]. </description> </method> <method name="instances_cull_aabb" qualifiers="const"> @@ -1929,6 +2067,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="instances_cull_convex" qualifiers="const"> @@ -1939,6 +2079,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="instances_cull_ray" qualifiers="const"> @@ -1951,7 +2093,7 @@ <argument index="2" name="scenario" type="RID"> </argument> <description> - Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. + Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> @@ -1963,6 +2105,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits]. </description> </method> <method name="light_directional_set_shadow_depth_range_mode"> @@ -1973,6 +2116,7 @@ <argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode"> </argument> <description> + Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options. </description> </method> <method name="light_directional_set_shadow_mode"> @@ -1983,6 +2127,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode"> </argument> <description> + Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. </description> </method> <method name="light_omni_set_shadow_detail"> @@ -1993,6 +2138,7 @@ <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail"> </argument> <description> + Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail]. </description> </method> <method name="light_omni_set_shadow_mode"> @@ -2003,6 +2149,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode"> </argument> <description> + Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode]. </description> </method> <method name="light_set_color"> @@ -2013,6 +2160,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the light. Equivalent to [member Light.light_color]. </description> </method> <method name="light_set_cull_mask"> @@ -2023,6 +2171,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask]. </description> </method> <method name="light_set_negative"> @@ -2033,6 +2182,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative]. </description> </method> <method name="light_set_param"> @@ -2045,6 +2195,7 @@ <argument index="2" name="value" type="float"> </argument> <description> + Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]. </description> </method> <method name="light_set_projector"> @@ -2055,6 +2206,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="light_set_reverse_cull_face_mode"> @@ -2065,6 +2217,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face]. </description> </method> <method name="light_set_shadow"> @@ -2075,6 +2228,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled]. </description> </method> <method name="light_set_shadow_color"> @@ -2085,6 +2239,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]. </description> </method> <method name="light_set_use_gi"> @@ -2102,6 +2257,9 @@ <return type="RID"> </return> <description> + Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="lightmap_capture_get_bounds" qualifiers="const"> @@ -2110,6 +2268,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the size of the lightmap capture area. </description> </method> <method name="lightmap_capture_get_energy" qualifiers="const"> @@ -2118,6 +2277,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the energy multiplier used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree" qualifiers="const"> @@ -2126,6 +2286,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the octree used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const"> @@ -2134,6 +2295,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell subdivision amount used by this lightmap capture's octree. </description> </method> <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const"> @@ -2142,6 +2304,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell transform for this lightmap capture's octree. </description> </method> <method name="lightmap_capture_set_bounds"> @@ -2152,6 +2315,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]. </description> </method> <method name="lightmap_capture_set_energy"> @@ -2162,6 +2326,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]. </description> </method> <method name="lightmap_capture_set_octree"> @@ -2172,6 +2337,7 @@ <argument index="1" name="octree" type="PoolByteArray"> </argument> <description> + Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]. </description> </method> <method name="lightmap_capture_set_octree_cell_subdiv"> @@ -2182,6 +2348,7 @@ <argument index="1" name="subdiv" type="int"> </argument> <description> + Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]. </description> </method> <method name="lightmap_capture_set_octree_cell_transform"> @@ -2192,6 +2359,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]. </description> </method> <method name="make_sphere_mesh"> @@ -2211,7 +2379,8 @@ <return type="RID"> </return> <description> - Returns an empty material. + Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="material_get_param" qualifiers="const"> @@ -2233,6 +2402,7 @@ <argument index="1" name="parameter" type="String"> </argument> <description> + Returns the default value for the param if available. Otherwise returns an empty [Variant]. </description> </method> <method name="material_get_shader" qualifiers="const"> @@ -2306,7 +2476,7 @@ </return> <argument index="0" name="mesh" type="RID"> </argument> - <argument index="1" name="primtive" type="int" enum="VisualServer.PrimitiveType"> + <argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType"> </argument> <argument index="2" name="arrays" type="Array"> </argument> @@ -2315,7 +2485,7 @@ <argument index="4" name="compress_format" type="int" default="97280"> </argument> <description> - Adds a surface generated from the Arrays to a mesh. See [code]PRIMITIVE_TYPE_*[/code] constants for types. + Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types. </description> </method> <method name="mesh_clear"> @@ -2331,7 +2501,9 @@ <return type="RID"> </return> <description> - Creates a new mesh. + Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="mesh_get_blend_shape_count" qualifiers="const"> @@ -2503,6 +2675,7 @@ <argument index="3" name="array_index" type="int"> </argument> <description> + Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_format_stride" qualifiers="const"> @@ -2515,6 +2688,7 @@ <argument index="2" name="index_len" type="int"> </argument> <description> + Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_index_array" qualifiers="const"> @@ -2586,6 +2760,7 @@ <argument index="3" name="data" type="PoolByteArray"> </argument> <description> + Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. </description> </method> <method name="multimesh_allocate"> @@ -2602,6 +2777,16 @@ <argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0"> </argument> <description> + Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count]. + </description> + </method> + <method name="multimesh_create"> + <return type="RID"> + </return> + <description> + Creates a new multimesh on the VisualServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="multimesh_get_aabb" qualifiers="const"> @@ -2610,6 +2795,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. </description> </method> <method name="multimesh_get_instance_count" qualifiers="const"> @@ -2618,6 +2804,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of instances allocated for this multimesh. </description> </method> <method name="multimesh_get_mesh" qualifiers="const"> @@ -2626,6 +2813,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the RID of the mesh that will be used in drawing this multimesh. </description> </method> <method name="multimesh_get_visible_instances" qualifiers="const"> @@ -2634,6 +2822,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of visible instances for this multimesh. </description> </method> <method name="multimesh_instance_get_color" qualifiers="const"> @@ -2644,6 +2833,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the color by which the specified instance will be modulated. </description> </method> <method name="multimesh_instance_get_custom_data" qualifiers="const"> @@ -2654,6 +2844,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the custom data associated with the specified instance. </description> </method> <method name="multimesh_instance_get_transform" qualifiers="const"> @@ -2664,6 +2855,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the [Transform] of the specified instance. </description> </method> <method name="multimesh_instance_get_transform_2d" qualifiers="const"> @@ -2674,6 +2866,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. </description> </method> <method name="multimesh_instance_set_color"> @@ -2686,6 +2879,7 @@ <argument index="2" name="color" type="Color"> </argument> <description> + Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. </description> </method> <method name="multimesh_instance_set_custom_data"> @@ -2698,6 +2892,7 @@ <argument index="2" name="custom_data" type="Color"> </argument> <description> + Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]. </description> </method> <method name="multimesh_instance_set_transform"> @@ -2710,6 +2905,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. </description> </method> <method name="multimesh_instance_set_transform_2d"> @@ -2722,6 +2918,7 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. </description> </method> <method name="multimesh_set_as_bulk_array"> @@ -2732,6 +2929,11 @@ <argument index="1" name="array" type="PoolRealArray"> </argument> <description> + Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. + + All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc. + + [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats. </description> </method> <method name="multimesh_set_mesh"> @@ -2742,6 +2944,7 @@ <argument index="1" name="mesh" type="RID"> </argument> <description> + Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. </description> </method> <method name="multimesh_set_visible_instances"> @@ -2752,18 +2955,25 @@ <argument index="1" name="visible" type="int"> </argument> <description> + Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. </description> </method> <method name="omni_light_create"> <return type="RID"> </return> <description> + Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_create"> <return type="RID"> </return> <description> + Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_get_current_aabb"> @@ -2772,6 +2982,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]. </description> </method> <method name="particles_get_emitting"> @@ -2780,6 +2991,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are currently set to emitting. </description> </method> <method name="particles_is_inactive"> @@ -2788,6 +3000,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are not emitting and particles are set to inactive. </description> </method> <method name="particles_request_process"> @@ -2796,6 +3009,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]. </description> </method> <method name="particles_restart"> @@ -2804,6 +3018,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Reset the particles on the next update. Equivalent to [method Particles.restart]. </description> </method> <method name="particles_set_amount"> @@ -2814,6 +3029,7 @@ <argument index="1" name="amount" type="int"> </argument> <description> + Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount]. </description> </method> <method name="particles_set_custom_aabb"> @@ -2824,6 +3040,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]. </description> </method> <method name="particles_set_draw_order"> @@ -2834,6 +3051,7 @@ <argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder"> </argument> <description> + Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order]. </description> </method> <method name="particles_set_draw_pass_mesh"> @@ -2846,6 +3064,7 @@ <argument index="2" name="mesh" type="RID"> </argument> <description> + Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4]. </description> </method> <method name="particles_set_draw_passes"> @@ -2856,6 +3075,7 @@ <argument index="1" name="count" type="int"> </argument> <description> + Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]. </description> </method> <method name="particles_set_emission_transform"> @@ -2866,6 +3086,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] that will be used by the particles when they first emit. </description> </method> <method name="particles_set_emitting"> @@ -2876,6 +3097,7 @@ <argument index="1" name="emitting" type="bool"> </argument> <description> + If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member Particles.emitting]. </description> </method> <method name="particles_set_explosiveness_ratio"> @@ -2886,6 +3108,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]. </description> </method> <method name="particles_set_fixed_fps"> @@ -2896,6 +3119,7 @@ <argument index="1" name="fps" type="int"> </argument> <description> + Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]. </description> </method> <method name="particles_set_fractional_delta"> @@ -2906,6 +3130,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]. </description> </method> <method name="particles_set_lifetime"> @@ -2916,6 +3141,7 @@ <argument index="1" name="lifetime" type="float"> </argument> <description> + Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]. </description> </method> <method name="particles_set_one_shot"> @@ -2926,6 +3152,7 @@ <argument index="1" name="one_shot" type="bool"> </argument> <description> + If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot]. </description> </method> <method name="particles_set_pre_process_time"> @@ -2936,6 +3163,7 @@ <argument index="1" name="time" type="float"> </argument> <description> + Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member Particles.preprocess]. </description> </method> <method name="particles_set_process_material"> @@ -2946,6 +3174,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material]. </description> </method> <method name="particles_set_randomness_ratio"> @@ -2956,6 +3185,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness]. </description> </method> <method name="particles_set_speed_scale"> @@ -2966,6 +3196,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]. </description> </method> <method name="particles_set_use_local_coordinates"> @@ -2976,12 +3207,16 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords]. </description> </method> <method name="reflection_probe_create"> <return type="RID"> </return> <description> + Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="reflection_probe_set_as_interior"> @@ -2992,6 +3227,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. </description> </method> <method name="reflection_probe_set_cull_mask"> @@ -3002,6 +3238,7 @@ <argument index="1" name="layers" type="int"> </argument> <description> + Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. </description> </method> <method name="reflection_probe_set_enable_box_projection"> @@ -3012,6 +3249,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. </description> </method> <method name="reflection_probe_set_enable_shadows"> @@ -3022,6 +3260,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. </description> </method> <method name="reflection_probe_set_extents"> @@ -3032,6 +3271,7 @@ <argument index="1" name="extents" type="Vector3"> </argument> <description> + Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. </description> </method> <method name="reflection_probe_set_intensity"> @@ -3042,6 +3282,7 @@ <argument index="1" name="intensity" type="float"> </argument> <description> + Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. </description> </method> <method name="reflection_probe_set_interior_ambient"> @@ -3052,6 +3293,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. </description> </method> <method name="reflection_probe_set_interior_ambient_energy"> @@ -3062,6 +3304,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. </description> </method> <method name="reflection_probe_set_interior_ambient_probe_contribution"> @@ -3072,6 +3315,7 @@ <argument index="1" name="contrib" type="float"> </argument> <description> + Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. </description> </method> <method name="reflection_probe_set_max_distance"> @@ -3082,6 +3326,7 @@ <argument index="1" name="distance" type="float"> </argument> <description> + Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. </description> </method> <method name="reflection_probe_set_origin_offset"> @@ -3092,6 +3337,7 @@ <argument index="1" name="offset" type="Vector3"> </argument> <description> + Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. </description> </method> <method name="reflection_probe_set_update_mode"> @@ -3102,6 +3348,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.ReflectionProbeUpdateMode"> </argument> <description> + Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. </description> </method> <method name="request_frame_drawn_callback"> @@ -3122,6 +3369,9 @@ <return type="RID"> </return> <description> + Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + The scenario is the 3D world that all the visual instances exist in. </description> </method> <method name="scenario_set_debug"> @@ -3132,6 +3382,7 @@ <argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode"> </argument> <description> + Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. </description> </method> <method name="scenario_set_environment"> @@ -3142,6 +3393,7 @@ <argument index="1" name="environment" type="RID"> </argument> <description> + Sets the environment that will be used with this scenario. </description> </method> <method name="scenario_set_fallback_environment"> @@ -3152,6 +3404,7 @@ <argument index="1" name="environment" type="RID"> </argument> <description> + Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. </description> </method> <method name="scenario_set_reflection_atlas_size"> @@ -3164,6 +3417,7 @@ <argument index="2" name="subdiv" type="int"> </argument> <description> + Sets the size of the reflection atlas shared by all reflection probes in this scenario. </description> </method> <method name="set_boot_image"> @@ -3187,6 +3441,7 @@ <argument index="0" name="generate" type="bool"> </argument> <description> + If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode. </description> </method> <method name="set_default_clear_color"> @@ -3195,13 +3450,15 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Sets the default clear color which is used when a specific clear color has not been selected. </description> </method> <method name="shader_create"> <return type="RID"> </return> <description> - Creates an empty shader. + Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="shader_get_code" qualifiers="const"> @@ -3267,6 +3524,7 @@ <argument index="2" name="is_2d_skeleton" type="bool" default="false"> </argument> <description> + Allocates the GPU buffers for this skeleton. </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> @@ -3277,6 +3535,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_get_transform_2d" qualifiers="const"> @@ -3287,6 +3546,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform2D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform"> @@ -3299,6 +3559,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform_2d"> @@ -3311,12 +3572,15 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_create"> <return type="RID"> </return> <description> + Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="skeleton_get_bone_count" qualifiers="const"> @@ -3325,13 +3589,15 @@ <argument index="0" name="skeleton" type="RID"> </argument> <description> + Returns the number of bones allocated for this skeleton. </description> </method> <method name="sky_create"> <return type="RID"> </return> <description> - Creates an empty sky. + Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="sky_set_texture"> @@ -3351,12 +3617,16 @@ <return type="RID"> </return> <description> + Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="sync"> <return type="void"> </return> <description> + Not implemented in Godot 3.x. </description> </method> <method name="texture_allocate"> @@ -3377,6 +3647,7 @@ <argument index="6" name="flags" type="int" default="7"> </argument> <description> + Allocates the GPU memory for the texture. </description> </method> <method name="texture_bind"> @@ -3394,7 +3665,8 @@ <return type="RID"> </return> <description> - Creates an empty texture. + Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="texture_create_from_image"> @@ -3432,6 +3704,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the depth of the texture. </description> </method> <method name="texture_get_flags" qualifiers="const"> @@ -3485,6 +3758,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the type of the texture, can be any of the [enum TextureType]. </description> </method> <method name="texture_get_width" qualifiers="const"> @@ -3533,6 +3807,7 @@ <argument index="9" name="layer" type="int" default="0"> </argument> <description> + Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly. </description> </method> <method name="texture_set_flags"> @@ -3578,6 +3853,7 @@ <argument index="3" name="depth" type="int"> </argument> <description> + Resizes the texture to the specified dimensions. </description> </method> <method name="textures_keep_original"> @@ -3621,7 +3897,7 @@ <argument index="2" name="screen" type="int" default="0"> </argument> <description> - Copies viewport to a region of the screen specified by [code]rect[/code]. If Viewport.[member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. + Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. For example, you can set the root viewport to not render at all with the following code: [codeblock] func _ready(): @@ -3635,7 +3911,8 @@ <return type="RID"> </return> <description> - Creates an empty viewport. + Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="viewport_detach"> @@ -3655,7 +3932,7 @@ <argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo"> </argument> <description> - Returns a viewport's render information. For options, see the [code]VIEWPORT_RENDER_INFO*[/code] constants. + Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants. </description> </method> <method name="viewport_get_texture" qualifiers="const"> @@ -3803,6 +4080,7 @@ <argument index="1" name="hidden" type="bool"> </argument> <description> + Currently unimplemented in Godot 3.x. </description> </method> <method name="viewport_set_msaa"> @@ -3946,10 +4224,12 @@ <signals> <signal name="frame_post_draw"> <description> + Emitted at the end of the frame, after the VisualServer has finished updating all the Viewports. </description> </signal> <signal name="frame_pre_draw"> <description> + Emitted at the beginning of the frame, before the VisualServer updates all the Viewports. </description> </signal> </signals> @@ -3958,6 +4238,7 @@ Marks an error that shows that the index array is empty. </constant> <constant name="ARRAY_WEIGHTS_SIZE" value="4"> + Number of weights/bones per vertex. </constant> <constant name="CANVAS_ITEM_Z_MIN" value="-4096"> The minimum Z-layer for canvas items. @@ -3966,8 +4247,10 @@ The maximum Z-layer for canvas items. </constant> <constant name="MAX_GLOW_LEVELS" value="7"> + Max number of glow levels that can be used with glow post-process effect. </constant> <constant name="MAX_CURSORS" value="8"> + Unused enum in Godot 3.x. </constant> <constant name="MATERIAL_RENDER_PRIORITY_MIN" value="-128"> The minimum renderpriority of all materials. @@ -3994,12 +4277,16 @@ Marks the back side of a cubemap. </constant> <constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType"> + Normal texture with 2 dimensions, width and height. </constant> <constant name="TEXTURE_TYPE_CUBEMAP" value="1" enum="TextureType"> + Texture made up of six faces, can be looked up with a [code]vec3[/code] in shader. </constant> <constant name="TEXTURE_TYPE_2D_ARRAY" value="2" enum="TextureType"> + An array of 2-dimensional textures. </constant> <constant name="TEXTURE_TYPE_3D" value="3" enum="TextureType"> + A 3-dimensional texture with width, height, and depth. </constant> <constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags"> Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. @@ -4114,11 +4401,13 @@ Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> + Flag used to mark a compressed bone array. </constant> <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> Flag used to mark a compressed (half float) weight array. </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> + Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. @@ -4154,8 +4443,10 @@ Represents the size of the [enum PrimitiveType] enum. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. @@ -4188,47 +4479,67 @@ Scales the shadow color. </constant> <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="8" enum="LightParam"> + Max distance that shadows will be rendered. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="LightParam"> + Proportion of shadow atlas occupied by the first split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="LightParam"> + Proportion of shadow atlas occupied by the second split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam"> + Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. </constant> <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="12" enum="LightParam"> + Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS" value="13" enum="LightParam"> + Bias the shadow lookup to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="LightParam"> + Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. </constant> <constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam"> Represents the size of the [enum LightParam] enum. </constant> <constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode"> + Use a dual paraboloid shadow map for omni lights. </constant> <constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode"> + Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail"> + Use more detail vertically when computing shadow map. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail"> + Use more detail horizontally when computing shadow map. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode"> + Use orthogonal shadow projection for directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS" value="1" enum="LightDirectionalShadowMode"> + Use 2 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS" value="2" enum="LightDirectionalShadowMode"> + Use 4 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE" value="0" enum="LightDirectionalShadowDepthRangeMode"> + Keeps shadows stable as camera moves but has lower effective resolution. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode"> + Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> + Do not update the viewport. </constant> <constant name="VIEWPORT_UPDATE_ONCE" value="1" enum="ViewportUpdateMode"> + Update the viewport once then set to disabled. </constant> <constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode"> + Update the viewport whenever it is visible. </constant> <constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode"> + Always update the viewport. </constant> <constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode"> The viewport is always cleared before drawing. @@ -4273,16 +4584,22 @@ The Viewport renders 3D but without effects. </constant> <constant name="VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="ViewportRenderInfo"> + Number of objects drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="ViewportRenderInfo"> + Number of vertices drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="ViewportRenderInfo"> + Number of material changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="ViewportRenderInfo"> + Number of shader changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="ViewportRenderInfo"> + Number of surface changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="ViewportRenderInfo"> + Number of draw calls during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MAX" value="6" enum="ViewportRenderInfo"> Represents the size of the [enum ViewportRenderInfo] enum. @@ -4300,12 +4617,16 @@ Debug draw draws objects in wireframe. </constant> <constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode"> + Do not use a debug mode. </constant> <constant name="SCENARIO_DEBUG_WIREFRAME" value="1" enum="ScenarioDebugMode"> + Draw all objects as wireframe models. </constant> <constant name="SCENARIO_DEBUG_OVERDRAW" value="2" enum="ScenarioDebugMode"> + Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. </constant> <constant name="SCENARIO_DEBUG_SHADELESS" value="3" enum="ScenarioDebugMode"> + Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. </constant> <constant name="INSTANCE_NONE" value="0" enum="InstanceType"> The instance does not have a type. @@ -4326,10 +4647,13 @@ The instance is a light. </constant> <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType"> + The instance is a reflection probe. </constant> <constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType"> + The instance is a GI probe. </constant> <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType"> + The instance is a lightmap capture. </constant> <constant name="INSTANCE_MAX" value="9" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. @@ -4338,19 +4662,25 @@ A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). </constant> <constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags"> + Allows the instance to be used in baked lighting. </constant> <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="InstanceFlags"> + When set, manually requests to draw geometry on next frame. </constant> <constant name="INSTANCE_FLAG_MAX" value="2" enum="InstanceFlags"> Represents the size of the [enum InstanceFlags] enum. </constant> <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting"> + Disable shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting"> + Cast shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting"> + Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. </constant> <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting"> + Only render the shadows from the object. The object itself will not be drawn. </constant> <constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode"> The nine patch gets stretched where needed. @@ -4374,16 +4704,22 @@ The light adds color depending on mask. </constant> <constant name="CANVAS_LIGHT_FILTER_NONE" value="0" enum="CanvasLightShadowFilter"> + Do not apply a filter to canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF3" value="1" enum="CanvasLightShadowFilter"> + Use PCF3 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF5" value="2" enum="CanvasLightShadowFilter"> + Use PCF5 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF7" value="3" enum="CanvasLightShadowFilter"> + Use PCF7 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF9" value="4" enum="CanvasLightShadowFilter"> + Use PCF9 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF13" value="5" enum="CanvasLightShadowFilter"> + Use PCF13 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_OCCLUDER_POLYGON_CULL_DISABLED" value="0" enum="CanvasOccluderPolygonCullMode"> Culling of the canvas occluder is disabled. @@ -4425,85 +4761,124 @@ The amount of vertex memory used. </constant> <constant name="FEATURE_SHADERS" value="0" enum="Features"> + Hardware supports shaders. This enum is currently unused in Godot 3.x. </constant> <constant name="FEATURE_MULTITHREADED" value="1" enum="Features"> + Hardware supports multithreading. This enum is currently unused in Godot 3.x. </constant> <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat"> + Use [Transform2D] to store MultiMesh transform. </constant> <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> + Use [Transform] to store MultiMesh transform. </constant> <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat"> + MultiMesh does not use per-instance color. </constant> <constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat"> + MultiMesh color uses 8 bits per component. This packs the color into a single float. </constant> <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat"> + MultiMesh color uses a float per channel. </constant> <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat"> + MultiMesh does not use custom data. </constant> <constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat"> + MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float. </constant> <constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat"> + MultiMesh custom data uses a float per component. </constant> <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> + Reflection probe will update reflections once and then stop. </constant> <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode"> + Reflection probe will update each frame. This mode is necessary to capture moving objects. </constant> <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder"> + Draw particles in the order that they appear in the particles array. </constant> <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> + Sort particles based on their lifetime. </constant> <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> + Sort particles based on their distance to the camera. </constant> <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG"> + Use the clear color as background. </constant> <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG"> + Use a specified color as the background. </constant> <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG"> + Use a sky resource for the background. </constant> <constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG"> + Use a custom color for background, but use a sky for shading and reflections. </constant> <constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG"> + Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. </constant> <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG"> + Do not clear the background, use whatever was rendered last frame as the background. </constant> <constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG"> Represents the size of the [enum EnvironmentBG] enum. </constant> <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality"> + Use lowest blur quality. Fastest, but may look bad. </constant> <constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality"> + Use medium blur quality. </constant> <constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality"> + Used highest blur quality. Looks the best, but is the slowest. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode"> + Add the effect of the glow on top of the scene. </constant> <constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode"> + Blends the glow effect with the screen. Does not get as bright as additive. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode"> + Produces a subtle color disturbance around objects. </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode"> + Shows the glow effect by itself without the underlying scene. </constant> <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> + Output color as they came in. </constant> <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> + Use the Reinhard tonemapper. </constant> <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> + Use the filmic tonemapper. </constant> <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> + Use the ACES tonemapper. </constant> <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> + Lowest quality of screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> + Medium quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> + Highest quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur"> + Disables the blur set for SSAO. Will make SSAO look noisier. </constant> <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur"> + Perform a 1x1 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur"> + Performs a 2x2 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur"> + Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. </constant> </constants> </class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 15216948e4..44e843f8a5 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShader" inherits="Shader" category="Core" version="3.2"> +<class name="VisualShader" inherits="Shader" version="4.0"> <brief_description> A custom shader program with a visual editor. </brief_description> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 9b0c6b2604..bed97565ff 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -1,18 +1,36 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNode" inherits="Resource" category="Core" version="3.2"> +<class name="VisualShaderNode" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link> </tutorials> <methods> + <method name="get_default_input_values" qualifiers="const"> + <return type="Array"> + </return> + <description> + Returns an [Array] containing default values for all of the input ports of the node in the form [code][index0, value0, index1, value1, ...][/code]. + </description> + </method> <method name="get_input_port_default_value" qualifiers="const"> <return type="Variant"> </return> <argument index="0" name="port" type="int"> </argument> <description> + Returns the default value of the input [code]port[/code]. + </description> + </method> + <method name="set_default_input_values"> + <return type="void"> + </return> + <argument index="0" name="values" type="Array"> + </argument> + <description> + Sets the default input ports values using an [Array] of the form [code][index0, value0, index1, value1, ...][/code]. For example: [code][0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)][/code]. </description> </method> <method name="set_input_port_default_value"> @@ -23,18 +41,19 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Sets the default value for the selected input [code]port[/code]. </description> </method> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" default="[ 0, Vector3( 0, 0, 0 ) ]"> - </member> <member name="output_port_for_preview" type="int" setter="set_output_port_for_preview" getter="get_output_port_for_preview" default="-1"> + Sets the output port index which will be showed for preview. If set to [code]-1[/code] no port will be open for preview. </member> </members> <signals> <signal name="editor_refresh_request"> <description> + Emitted when the node requests an editor refresh. Currently called only in setter of [member VisualShaderNodeTexture.source], [VisualShaderNodeTexture], and [VisualShaderNodeCubeMap] (and their derivatives). </description> </signal> </signals> diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml index 2490dbbcc0..cccb64e874 100644 --- a/doc/classes/VisualShaderNodeBooleanConstant.xml +++ b/doc/classes/VisualShaderNodeBooleanConstant.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNode" version="4.0"> <brief_description> + A boolean constant to be used within the visual shader graph. </brief_description> <description> + Has only one output port and no inputs. + Translated to [code]bool[/code] in the shader language. </description> <tutorials> </tutorials> @@ -10,8 +13,8 @@ </methods> <members> <member name="constant" type="bool" setter="set_constant" getter="get_constant" default="false"> + A boolean constant which represents a state of this node. </member> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> </members> <constants> </constants> diff --git a/doc/classes/VisualShaderNodeBooleanUniform.xml b/doc/classes/VisualShaderNodeBooleanUniform.xml index 518c7ba3b8..8313a8256e 100644 --- a/doc/classes/VisualShaderNodeBooleanUniform.xml +++ b/doc/classes/VisualShaderNodeBooleanUniform.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeBooleanUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeBooleanUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> + A boolean uniform to be used within the visual shader graph. </brief_description> <description> + Translated to [code]uniform bool[/code] in the shader language. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml index f58d1d8e76..9b122ca8e1 100644 --- a/doc/classes/VisualShaderNodeColorConstant.xml +++ b/doc/classes/VisualShaderNodeColorConstant.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNode" version="4.0"> <brief_description> + A [Color] constant to be used within the visual shader graph. </brief_description> <description> + Has two output ports representing RGB and alpha channels of [Color]. + Translated to [code]vec3 rgb[/code] and [code]float alpha[/code] in the shader language. </description> <tutorials> </tutorials> @@ -10,8 +13,8 @@ </methods> <members> <member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color( 1, 1, 1, 1 )"> + A [Color] constant which represents a state of this node. </member> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> </members> <constants> </constants> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index b37a669ee9..b9abf85802 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeColorFunc" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeColorFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> + A [Color] function to be used within the visual shader graph. </brief_description> <description> + Accept a [Color] to the input port and transform it according to [member function]. </description> <tutorials> </tutorials> @@ -10,12 +12,29 @@ </methods> <members> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeColorFunc.Function" default="0"> + A function to be applied to the input color. See [enum Function] for options. </member> </members> <constants> <constant name="FUNC_GRAYSCALE" value="0" enum="Function"> + Converts the color to grayscale using the following formula: + [codeblock] + vec3 c = input; + float max1 = max(c.r, c.g); + float max2 = max(max1, c.b); + float max3 = max(max1, max2); + return vec3(max3, max3, max3); + [/codeblock] </constant> <constant name="FUNC_SEPIA" value="1" enum="Function"> + Applies sepia tone effect using the following formula: + [codeblock] + vec3 c = input; + float r = (c.r * 0.393) + (c.g * 0.769) + (c.b * 0.189); + float g = (c.r * 0.349) + (c.g * 0.686) + (c.b * 0.168); + float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131); + return vec3(r, g, b); + [/codeblock] </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml index 9997e9c83c..629e84d47b 100644 --- a/doc/classes/VisualShaderNodeColorOp.xml +++ b/doc/classes/VisualShaderNodeColorOp.xml @@ -1,36 +1,98 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeColorOp" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeColorOp" inherits="VisualShaderNode" version="4.0"> <brief_description> + A [Color] operator to be used within the visual shader graph. </brief_description> <description> + Applies [member operator] to two color inputs. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" /> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeColorOp.Operator" default="0"> + An operator to be applied to the inputs. See [enum Operator] for options. </member> </members> <constants> <constant name="OP_SCREEN" value="0" enum="Operator"> + Produce a screen effect with the following formula: + [codeblock] + result = vec3(1.0) - (vec3(1.0) - a) * (vec3(1.0) - b); + [/codeblock] </constant> <constant name="OP_DIFFERENCE" value="1" enum="Operator"> + Produce a difference effect with the following formula: + [codeblock] + result = abs(a - b); + [/codeblock] </constant> <constant name="OP_DARKEN" value="2" enum="Operator"> + Produce a darken effect with the following formula: + [codeblock] + result = min(a, b); + [/codeblock] </constant> <constant name="OP_LIGHTEN" value="3" enum="Operator"> + Produce a lighten effect with the following formula: + [codeblock] + result = max(a, b); + [/codeblock] </constant> <constant name="OP_OVERLAY" value="4" enum="Operator"> + Produce an overlay effect with the following formula: + [codeblock] + for (int i = 0; i < 3; i++) { + float base = a[i]; + float blend = b[i]; + if (base < 0.5) { + result[i] = 2.0 * base * blend; + } else { + result[i] = 1.0 - 2.0 * (1.0 - blend) * (1.0 - base); + } + } + [/codeblock] </constant> <constant name="OP_DODGE" value="5" enum="Operator"> + Produce a dodge effect with the following formula: + [codeblock] + result = a / (vec3(1.0) - b); + [/codeblock] </constant> <constant name="OP_BURN" value="6" enum="Operator"> + Produce a burn effect with the following formula: + [codeblock] + result = vec3(1.0) - (vec3(1.0) - a) / b; + [/codeblock] </constant> <constant name="OP_SOFT_LIGHT" value="7" enum="Operator"> + Produce a soft light effect with the following formula: + [codeblock] + for (int i = 0; i < 3; i++) { + float base = a[i]; + float blend = b[i]; + if (base < 0.5) { + result[i] = base * (blend + 0.5); + } else { + result[i] = 1.0 - (1.0 - base) * (1.0 - (blend - 0.5)); + } + } + [/codeblock] </constant> <constant name="OP_HARD_LIGHT" value="8" enum="Operator"> + Produce a hard light effect with the following formula: + [codeblock] + for (int i = 0; i < 3; i++) { + float base = a[i]; + float blend = b[i]; + if (base < 0.5) { + result[i] = base * (2.0 * blend); + } else { + result[i] = 1.0 - (1.0 - base) * (1.0 - 2.0 * (blend - 0.5)); + } + } + [/codeblock] </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeColorUniform.xml b/doc/classes/VisualShaderNodeColorUniform.xml index ec61729782..6972ccefd9 100644 --- a/doc/classes/VisualShaderNodeColorUniform.xml +++ b/doc/classes/VisualShaderNodeColorUniform.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeColorUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeColorUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> + A [Color] uniform to be used within the visual shader graph. </brief_description> <description> + Translated to [code]uniform vec4[/code] in the shader language. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index b1106998e9..f207cba0a5 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" version="4.0"> <brief_description> + A comparison function for common types within the visual shader graph. </brief_description> <description> + Compares [code]a[/code] and [code]b[/code] of [member type] by [member function]. Returns a boolean scalar. Translates to [code]if[/code] instruction in shader code. </description> <tutorials> </tutorials> @@ -10,37 +12,51 @@ </methods> <members> <member name="condition" type="int" setter="set_condition" getter="get_condition" enum="VisualShaderNodeCompare.Condition" default="0"> + Extra condition which is applied if [member type] is set to [constant CTYPE_VECTOR]. </member> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 1e-05 ]" /> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeCompare.Function" default="0"> + A comparison function. See [enum Function] for options. </member> - <member name="type" type="int" setter="set_comparsion_type" getter="get_comparsion_type" enum="VisualShaderNodeCompare.ComparsionType" default="0"> + <member name="type" type="int" setter="set_comparison_type" getter="get_comparison_type" enum="VisualShaderNodeCompare.ComparisonType" default="0"> + The type to be used in the comparison. See [enum ComparisonType] for options. </member> </members> <constants> - <constant name="CTYPE_SCALAR" value="0" enum="ComparsionType"> + <constant name="CTYPE_SCALAR" value="0" enum="ComparisonType"> + A floating-point scalar. </constant> - <constant name="CTYPE_VECTOR" value="1" enum="ComparsionType"> + <constant name="CTYPE_VECTOR" value="1" enum="ComparisonType"> + A 3D vector type. </constant> - <constant name="CTYPE_BOOLEAN" value="2" enum="ComparsionType"> + <constant name="CTYPE_BOOLEAN" value="2" enum="ComparisonType"> + A boolean type. </constant> - <constant name="CTYPE_TRANSFORM" value="3" enum="ComparsionType"> + <constant name="CTYPE_TRANSFORM" value="3" enum="ComparisonType"> + A transform ([code]mat4[/code]) type. </constant> <constant name="FUNC_EQUAL" value="0" enum="Function"> + Comparison for equality ([code]a == b[/code]). </constant> <constant name="FUNC_NOT_EQUAL" value="1" enum="Function"> + Comparison for inequality ([code]a != b[/code]). </constant> <constant name="FUNC_GREATER_THAN" value="2" enum="Function"> + Comparison for greater than ([code]a > b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="FUNC_GREATER_THAN_EQUAL" value="3" enum="Function"> + Comparison for greater than or equal ([code]a >= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="FUNC_LESS_THAN" value="4" enum="Function"> + Comparison for less than ([code]a < b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function"> + Comparison for less than or equal ([code]a < b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> <constant name="COND_ALL" value="0" enum="Condition"> + The result will be true if all of component in vector satisfy the comparison condition. </constant> <constant name="COND_ANY" value="1" enum="Condition"> + The result will be true if any of component in vector satisfy the comparison condition. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCubeMap.xml b/doc/classes/VisualShaderNodeCubeMap.xml index 29ebe95086..8b9cec968c 100644 --- a/doc/classes/VisualShaderNodeCubeMap.xml +++ b/doc/classes/VisualShaderNodeCubeMap.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeCubeMap" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeCubeMap" inherits="VisualShaderNode" version="4.0"> <brief_description> + A [CubeMap] sampling node to be used within the visual shader graph. </brief_description> <description> + Translated to [code]texture(cubemap, vec3)[/code] in the shader language. Returns a color vector and alpha channel as scalar. </description> <tutorials> </tutorials> @@ -10,23 +12,30 @@ </methods> <members> <member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map"> + The [CubeMap] texture to sample when using [constant SOURCE_TEXTURE] as [member source]. </member> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeCubeMap.Source" default="0"> + Defines which source should be used for the sampling. See [enum Source] for options. </member> <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType" default="0"> + Defines the type of data provided by the source texture. See [enum TextureType] for options. </member> </members> <constants> <constant name="SOURCE_TEXTURE" value="0" enum="Source"> + Use the [CubeMap] set via [member cube_map]. If this is set to [member source], the [code]samplerCube[/code] port is ignored. </constant> <constant name="SOURCE_PORT" value="1" enum="Source"> + Use the [CubeMap] sampler reference passed via the [code]samplerCube[/code] port. If this is set to [member source], the [member cube_map] texture is ignored. </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> + No hints are added to the uniform declaration. </constant> <constant name="TYPE_COLOR" value="1" enum="TextureType"> + Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion. </constant> <constant name="TYPE_NORMALMAP" value="2" enum="TextureType"> + Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCubeMapUniform.xml b/doc/classes/VisualShaderNodeCubeMapUniform.xml index c6b3db5a9d..c5cb6ed938 100644 --- a/doc/classes/VisualShaderNodeCubeMapUniform.xml +++ b/doc/classes/VisualShaderNodeCubeMapUniform.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeCubeMapUniform" inherits="VisualShaderNodeTextureUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeCubeMapUniform" inherits="VisualShaderNodeTextureUniform" version="4.0"> <brief_description> + A [CubeMap] uniform node to be used within the visual shader graph. </brief_description> <description> + Translated to [code]uniform samplerCube[/code] in the shader language. The output value can be used as port for [VisualShaderNodeCubeMap]. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 5219dcb77b..9ccdf0d3c4 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeCustom" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeCustom" inherits="VisualShaderNode" version="4.0"> <brief_description> Virtual class to define custom [VisualShaderNode]s for use in the Visual Shader Editor. </brief_description> @@ -13,7 +13,7 @@ [/codeblock] </description> <tutorials> - <link>http://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link> </tutorials> <methods> <method name="_get_category" qualifiers="virtual"> @@ -144,9 +144,6 @@ </description> </method> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml index 4ea7e5ed6e..72be31872d 100644 --- a/doc/classes/VisualShaderNodeDeterminant.xml +++ b/doc/classes/VisualShaderNodeDeterminant.xml @@ -1,16 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeDeterminant" inherits="VisualShaderNode" version="4.0"> <brief_description> + Calculates the determinant of a [Transform] within the visual shader graph. </brief_description> <description> + Translates to [code]deteminant(x)[/code] in the shader language. </description> <tutorials> </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeDotProduct.xml b/doc/classes/VisualShaderNodeDotProduct.xml index 4c2bae39a1..51166ab58f 100644 --- a/doc/classes/VisualShaderNodeDotProduct.xml +++ b/doc/classes/VisualShaderNodeDotProduct.xml @@ -1,16 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeDotProduct" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeDotProduct" inherits="VisualShaderNode" version="4.0"> <brief_description> + Calculates a dot product of two vectors within the visual shader graph. </brief_description> <description> + Translates to [code]dot(a, b)[/code] in the shader language. </description> <tutorials> </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml index 9727b8698b..f571edaab3 100644 --- a/doc/classes/VisualShaderNodeExpression.xml +++ b/doc/classes/VisualShaderNodeExpression.xml @@ -1,22 +1,19 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeExpression" inherits="VisualShaderNodeGroupBase" category="Core" version="3.2"> +<class name="VisualShaderNodeExpression" inherits="VisualShaderNodeGroupBase" version="4.0"> <brief_description> + A custom visual shader graph expression written in Godot Shading Language. </brief_description> <description> + Custom Godot Shading Language expression, with a custom amount of input and output ports. + The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions. </description> <tutorials> </tutorials> <methods> - <method name="build"> - <return type="void"> - </return> - <description> - </description> - </method> </methods> <members> - <member name="editable" type="bool" setter="set_editable" getter="is_editable" override="true" default="true" /> <member name="expression" type="String" setter="set_expression" getter="get_expression" default=""""> + An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), and thus cannot be used to declare functions, varyings, uniforms, or global constants. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeFaceForward.xml b/doc/classes/VisualShaderNodeFaceForward.xml index 9c755cc6de..5ef08ea8c2 100644 --- a/doc/classes/VisualShaderNodeFaceForward.xml +++ b/doc/classes/VisualShaderNodeFaceForward.xml @@ -1,16 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeFaceForward" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeFaceForward" inherits="VisualShaderNode" version="4.0"> <brief_description> + Returns the vector that points in the same direction as a reference vector within the visual shader graph. </brief_description> <description> + Translates to [code]faceforward(N, I, Nref)[/code] in the shader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise [code]-N[/code] is returned. </description> <tutorials> </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeFresnel.xml b/doc/classes/VisualShaderNodeFresnel.xml index f79ae04abf..c396b4574c 100644 --- a/doc/classes/VisualShaderNodeFresnel.xml +++ b/doc/classes/VisualShaderNodeFresnel.xml @@ -1,16 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeFresnel" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeFresnel" inherits="VisualShaderNode" version="4.0"> <brief_description> + A Fresnel effect to be used within the visual shader graph. </brief_description> <description> + Returns falloff based on the dot product of surface normal and view direction of camera (pass associated inputs to it). </description> <tutorials> </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, false, 3, 1.0 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeGlobalExpression.xml b/doc/classes/VisualShaderNodeGlobalExpression.xml index f008c639cf..8023ba1890 100644 --- a/doc/classes/VisualShaderNodeGlobalExpression.xml +++ b/doc/classes/VisualShaderNodeGlobalExpression.xml @@ -1,16 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeGlobalExpression" inherits="VisualShaderNodeExpression" category="Core" version="3.2"> +<class name="VisualShaderNodeGlobalExpression" inherits="VisualShaderNodeExpression" version="4.0"> <brief_description> + A custom global visual shader graph expression written in Godot Shading Language. </brief_description> <description> + Custom Godot Shader Language expression, which is placed on top of the generated shader. You can place various function definitions inside to call later in [VisualShaderNodeExpression]s (which are injected in the main shader functions). You can also declare varyings, uniforms and global constants. </description> <tutorials> </tutorials> <methods> </methods> - <members> - <member name="editable" type="bool" setter="set_editable" getter="is_editable" override="true" default="false" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml index 511a56b7a6..13018d52f3 100644 --- a/doc/classes/VisualShaderNodeGroupBase.xml +++ b/doc/classes/VisualShaderNodeGroupBase.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeGroupBase" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeGroupBase" inherits="VisualShaderNode" version="4.0"> <brief_description> + Base class for a family of nodes with variable amount of input and output ports within the visual shader graph. </brief_description> <description> + Currently, has no direct usage, use the derived classes instead. </description> <tutorials> </tutorials> @@ -17,6 +19,7 @@ <argument index="2" name="name" type="String"> </argument> <description> + Adds an input port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code]. </description> </method> <method name="add_output_port"> @@ -29,68 +32,63 @@ <argument index="2" name="name" type="String"> </argument> <description> + Adds an output port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code]. </description> </method> <method name="clear_input_ports"> <return type="void"> </return> <description> + Removes all previously specified input ports. </description> </method> <method name="clear_output_ports"> <return type="void"> </return> <description> - </description> - </method> - <method name="get_control"> - <return type="Control"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <description> + Removes all previously specified output ports. </description> </method> <method name="get_free_input_port_id" qualifiers="const"> <return type="int"> </return> <description> + Returns a free input port ID which can be used in [method add_input_port]. </description> </method> <method name="get_free_output_port_id" qualifiers="const"> <return type="int"> </return> <description> + Returns a free output port ID which can be used in [method add_output_port]. </description> </method> <method name="get_input_port_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of input ports in use. Alternative for [method get_free_input_port_id]. </description> </method> <method name="get_inputs" qualifiers="const"> <return type="String"> </return> <description> + Returns a [String] description of the input ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]). </description> </method> <method name="get_output_port_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of output ports in use. Alternative for [method get_free_output_port_id]. </description> </method> <method name="get_outputs" qualifiers="const"> <return type="String"> </return> <description> - </description> - </method> - <method name="get_size" qualifiers="const"> - <return type="Vector2"> - </return> - <description> + Returns a [String] description of the output ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]). </description> </method> <method name="has_input_port" qualifiers="const"> @@ -99,6 +97,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns [code]true[/code] if the specified input port exists. </description> </method> <method name="has_output_port" qualifiers="const"> @@ -107,6 +106,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns [code]true[/code] if the specified output port exists. </description> </method> <method name="is_valid_port_name" qualifiers="const"> @@ -115,6 +115,7 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns [code]true[/code] if the specified port name does not override an existed port name and is valid within the shader. </description> </method> <method name="remove_input_port"> @@ -123,6 +124,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Removes the specified input port. </description> </method> <method name="remove_output_port"> @@ -131,16 +133,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - </description> - </method> - <method name="set_control"> - <return type="void"> - </return> - <argument index="0" name="control" type="Control"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <description> + Removes the specified output port. </description> </method> <method name="set_input_port_name"> @@ -151,6 +144,7 @@ <argument index="1" name="name" type="String"> </argument> <description> + Renames the specified input port. </description> </method> <method name="set_input_port_type"> @@ -161,6 +155,7 @@ <argument index="1" name="type" type="int"> </argument> <description> + Sets the specified input port's type (see [enum VisualShaderNode.PortType]). </description> </method> <method name="set_inputs"> @@ -169,6 +164,7 @@ <argument index="0" name="inputs" type="String"> </argument> <description> + Defines all input ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_input_port]). </description> </method> <method name="set_output_port_name"> @@ -179,6 +175,7 @@ <argument index="1" name="name" type="String"> </argument> <description> + Renames the specified output port. </description> </method> <method name="set_output_port_type"> @@ -189,6 +186,7 @@ <argument index="1" name="type" type="int"> </argument> <description> + Sets the specified output port's type (see [enum VisualShaderNode.PortType]). </description> </method> <method name="set_outputs"> @@ -197,20 +195,13 @@ <argument index="0" name="outputs" type="String"> </argument> <description> - </description> - </method> - <method name="set_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2"> - </argument> - <description> + Defines all output ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_output_port]). </description> </method> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> - <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="false"> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )"> + The size of the node in the visual shader graph. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml index 6900cdf81b..0a8fdcfd4d 100644 --- a/doc/classes/VisualShaderNodeIf.xml +++ b/doc/classes/VisualShaderNodeIf.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeIf" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeIf" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 1e-05, 3, Vector3( 0, 0, 0 ), 4, Vector3( 0, 0, 0 ), 5, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index bfcd4c734c..1c8d8d84c4 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeInput" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeInput" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -15,7 +15,6 @@ </method> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> <member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default=""[None]""> </member> </members> diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml index c221e60b75..184c9e099f 100644 --- a/doc/classes/VisualShaderNodeIs.xml +++ b/doc/classes/VisualShaderNodeIs.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeIs" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeIs" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0 ]" /> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIs.Function" default="0"> </member> </members> diff --git a/doc/classes/VisualShaderNodeOuterProduct.xml b/doc/classes/VisualShaderNodeOuterProduct.xml index 6111084b44..b8d4fd687f 100644 --- a/doc/classes/VisualShaderNodeOuterProduct.xml +++ b/doc/classes/VisualShaderNodeOuterProduct.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeOuterProduct" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeOuterProduct" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeOutput.xml b/doc/classes/VisualShaderNodeOutput.xml index ff109a949e..c63e307bad 100644 --- a/doc/classes/VisualShaderNodeOutput.xml +++ b/doc/classes/VisualShaderNodeOutput.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeOutput" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeOutput" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeScalarClamp.xml b/doc/classes/VisualShaderNodeScalarClamp.xml index 927aeb01ce..fd963dcb5d 100644 --- a/doc/classes/VisualShaderNodeScalarClamp.xml +++ b/doc/classes/VisualShaderNodeScalarClamp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarClamp" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarClamp" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 1.0 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeScalarConstant.xml index c4ac65aa48..f7b94d9e39 100644 --- a/doc/classes/VisualShaderNodeScalarConstant.xml +++ b/doc/classes/VisualShaderNodeScalarConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarConstant" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -11,7 +11,6 @@ <members> <member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0"> </member> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> </members> <constants> </constants> diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml index 795054637e..fa9aa07761 100644 --- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarDerivativeFunc" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarDerivativeFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0 ]" /> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarDerivativeFunc.Function" default="0"> </member> </members> diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeScalarFunc.xml index 81ccf8aeb6..b306d198f6 100644 --- a/doc/classes/VisualShaderNodeScalarFunc.xml +++ b/doc/classes/VisualShaderNodeScalarFunc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0 ]" /> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13"> </member> </members> diff --git a/doc/classes/VisualShaderNodeScalarInterp.xml b/doc/classes/VisualShaderNodeScalarInterp.xml index 7e40304b04..a25ab750cc 100644 --- a/doc/classes/VisualShaderNodeScalarInterp.xml +++ b/doc/classes/VisualShaderNodeScalarInterp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarInterp" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarInterp" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 1.0, 2, 0.5 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeScalarOp.xml index 3ff56bffaa..f13f16cdd2 100644 --- a/doc/classes/VisualShaderNodeScalarOp.xml +++ b/doc/classes/VisualShaderNodeScalarOp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarOp" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0 ]" /> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0"> </member> </members> diff --git a/doc/classes/VisualShaderNodeScalarSmoothStep.xml b/doc/classes/VisualShaderNodeScalarSmoothStep.xml index e71bb16f6f..1ac16e451f 100644 --- a/doc/classes/VisualShaderNodeScalarSmoothStep.xml +++ b/doc/classes/VisualShaderNodeScalarSmoothStep.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarSmoothStep" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarSmoothStep" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 0.0 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeScalarSwitch.xml b/doc/classes/VisualShaderNodeScalarSwitch.xml index 2828f42b47..789c8972bb 100644 --- a/doc/classes/VisualShaderNodeScalarSwitch.xml +++ b/doc/classes/VisualShaderNodeScalarSwitch.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarSwitch" inherits="VisualShaderNodeSwitch" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarSwitch" inherits="VisualShaderNodeSwitch" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, false, 1, 1.0, 2, 0.0 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeScalarUniform.xml b/doc/classes/VisualShaderNodeScalarUniform.xml index bdbb02561b..fab766d3f9 100644 --- a/doc/classes/VisualShaderNodeScalarUniform.xml +++ b/doc/classes/VisualShaderNodeScalarUniform.xml @@ -1,13 +1,38 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeScalarUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> + A scalar uniform to be used within the visual shader graph. </brief_description> <description> + Translated to [code]uniform float[/code] in the shader language. </description> <tutorials> </tutorials> <methods> </methods> + <members> + <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeScalarUniform.Hint" default="0"> + A hint applied to the uniform, which controls the values it can take when set through the inspector. + </member> + <member name="max" type="float" setter="set_max" getter="get_max" default="1.0"> + Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="min" type="float" setter="set_min" getter="get_min" default="0.0"> + Maximum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. + </member> + <member name="step" type="float" setter="set_step" getter="get_step" default="0.1"> + Step (increment) value for the range hint with step. Used if [member hint] is set to [constant HINT_RANGE_STEP]. + </member> + </members> <constants> + <constant name="HINT_NONE" value="0" enum="Hint"> + No hint used. + </constant> + <constant name="HINT_RANGE" value="1" enum="Hint"> + A range hint for scalar value, which limits possible input values between [member min] and [member max]. Translated to [code]hint_range(min, max)[/code] in shader code. + </constant> + <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> + A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml index 704ac08adb..5bbb9168a0 100644 --- a/doc/classes/VisualShaderNodeSwitch.xml +++ b/doc/classes/VisualShaderNodeSwitch.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, false, 1, Vector3( 1, 1, 1 ), 2, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index a94b798745..e1c12c69b6 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTexture" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeTexture" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0"> </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> @@ -28,6 +27,8 @@ </constant> <constant name="SOURCE_DEPTH" value="4" enum="Source"> </constant> + <constant name="SOURCE_PORT" value="5" enum="Source"> + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> </constant> <constant name="TYPE_COLOR" value="1" enum="TextureType"> diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index 3d58ec88c5..4e2c39a297 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTextureUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeTextureUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml index d4e142651e..3d69575444 100644 --- a/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml +++ b/doc/classes/VisualShaderNodeTextureUniformTriplanar.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTextureUniformTriplanar" inherits="VisualShaderNodeTextureUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeTextureUniformTriplanar" inherits="VisualShaderNodeTextureUniform" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeTransformCompose.xml b/doc/classes/VisualShaderNodeTransformCompose.xml index 0c44e6b3c5..6d9cab7ab0 100644 --- a/doc/classes/VisualShaderNodeTransformCompose.xml +++ b/doc/classes/VisualShaderNodeTransformCompose.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeTransformCompose" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 0, 0, 0 ), 3, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index 737961f8ec..15422e1728 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -11,7 +11,6 @@ <members> <member name="constant" type="Transform" setter="set_constant" getter="get_constant" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> </members> <constants> </constants> diff --git a/doc/classes/VisualShaderNodeTransformDecompose.xml b/doc/classes/VisualShaderNodeTransformDecompose.xml index 911d2e953a..4d3c464781 100644 --- a/doc/classes/VisualShaderNodeTransformDecompose.xml +++ b/doc/classes/VisualShaderNodeTransformDecompose.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeTransformDecompose" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index 53b7c9f1ab..d2b6fcef2b 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeTransformFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" /> <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeTransformFunc.Function" default="0"> </member> </members> diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml index f5368b3b1c..5893d1413b 100644 --- a/doc/classes/VisualShaderNodeTransformMult.xml +++ b/doc/classes/VisualShaderNodeTransformMult.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), 1, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) ]" /> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformMult.Operator" default="0"> </member> </members> diff --git a/doc/classes/VisualShaderNodeTransformUniform.xml b/doc/classes/VisualShaderNodeTransformUniform.xml index 0a28e0c1f6..7605ef96d5 100644 --- a/doc/classes/VisualShaderNodeTransformUniform.xml +++ b/doc/classes/VisualShaderNodeTransformUniform.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeTransformUniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index 9ab9c08562..d53c3c5ae5 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeTransformVecMult" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" /> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformVecMult.Operator" default="0"> </member> </members> diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml index 05539294a0..c4362f6f2a 100644 --- a/doc/classes/VisualShaderNodeUniform.xml +++ b/doc/classes/VisualShaderNodeUniform.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeUniform" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeUniform" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> <member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default=""""> </member> </members> diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml index 06e033cd9d..8532c5476f 100644 --- a/doc/classes/VisualShaderNodeVec3Constant.xml +++ b/doc/classes/VisualShaderNodeVec3Constant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -11,7 +11,6 @@ <members> <member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3( 0, 0, 0 )"> </member> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> </members> <constants> </constants> diff --git a/doc/classes/VisualShaderNodeVec3Uniform.xml b/doc/classes/VisualShaderNodeVec3Uniform.xml index a1c9b14566..f2b4c4778b 100644 --- a/doc/classes/VisualShaderNodeVec3Uniform.xml +++ b/doc/classes/VisualShaderNodeVec3Uniform.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVec3Uniform" inherits="VisualShaderNodeUniform" category="Core" version="3.2"> +<class name="VisualShaderNodeVec3Uniform" inherits="VisualShaderNodeUniform" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeVectorClamp.xml b/doc/classes/VisualShaderNodeVectorClamp.xml index 8b9a0cacff..85c093f84c 100644 --- a/doc/classes/VisualShaderNodeVectorClamp.xml +++ b/doc/classes/VisualShaderNodeVectorClamp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorClamp" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorClamp" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 1, 1, 1 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorCompose.xml b/doc/classes/VisualShaderNodeVectorCompose.xml index 11eb4d2778..e5e4924a9e 100644 --- a/doc/classes/VisualShaderNodeVectorCompose.xml +++ b/doc/classes/VisualShaderNodeVectorCompose.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorCompose" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorCompose" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, 0.0 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorDecompose.xml b/doc/classes/VisualShaderNodeVectorDecompose.xml index 30727379e6..5378f38b6d 100644 --- a/doc/classes/VisualShaderNodeVectorDecompose.xml +++ b/doc/classes/VisualShaderNodeVectorDecompose.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorDecompose" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorDecompose" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml index 56f89ffc38..d62512d68b 100644 --- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorDerivativeFunc" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorDerivativeFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeVectorDistance.xml b/doc/classes/VisualShaderNodeVectorDistance.xml index 3b7f743864..2e681156a5 100644 --- a/doc/classes/VisualShaderNodeVectorDistance.xml +++ b/doc/classes/VisualShaderNodeVectorDistance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorDistance" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorDistance" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index 3725a43395..0b3f317b8b 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorFunc" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorFunc" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeVectorInterp.xml b/doc/classes/VisualShaderNodeVectorInterp.xml index 7aa525cd0e..4d6d3ac577 100644 --- a/doc/classes/VisualShaderNodeVectorInterp.xml +++ b/doc/classes/VisualShaderNodeVectorInterp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorInterp" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorInterp" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 1, 1, 1 ), 2, Vector3( 0.5, 0.5, 0.5 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorLen.xml b/doc/classes/VisualShaderNodeVectorLen.xml index f6fdc0aff3..ade575310c 100644 --- a/doc/classes/VisualShaderNodeVectorLen.xml +++ b/doc/classes/VisualShaderNodeVectorLen.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorLen" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorLen" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml index d237ee56b0..8c391d09a2 100644 --- a/doc/classes/VisualShaderNodeVectorOp.xml +++ b/doc/classes/VisualShaderNodeVectorOp.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorOp" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorOp" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -9,7 +9,6 @@ <methods> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ) ]" /> <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeVectorOp.Operator" default="0"> </member> </members> diff --git a/doc/classes/VisualShaderNodeVectorRefract.xml b/doc/classes/VisualShaderNodeVectorRefract.xml index 453c2bf02f..c5962e7e10 100644 --- a/doc/classes/VisualShaderNodeVectorRefract.xml +++ b/doc/classes/VisualShaderNodeVectorRefract.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorRefract" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, 0.0 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorScalarMix.xml b/doc/classes/VisualShaderNodeVectorScalarMix.xml index 4ab396a14b..c425bfe45e 100644 --- a/doc/classes/VisualShaderNodeVectorScalarMix.xml +++ b/doc/classes/VisualShaderNodeVectorScalarMix.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorScalarMix" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorScalarMix" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 1, 1, 1 ), 2, 0.5 ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml index 2aeb8c1b53..2f341d71e0 100644 --- a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml +++ b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorScalarSmoothStep" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorScalarSmoothStep" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, 0.0, 2, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorScalarStep.xml b/doc/classes/VisualShaderNodeVectorScalarStep.xml index c448404b7f..11da106001 100644 --- a/doc/classes/VisualShaderNodeVectorScalarStep.xml +++ b/doc/classes/VisualShaderNodeVectorScalarStep.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorScalarStep" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorScalarStep" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, 0.0, 1, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorSmoothStep.xml b/doc/classes/VisualShaderNodeVectorSmoothStep.xml index bb80832c3c..54e9f1bd7d 100644 --- a/doc/classes/VisualShaderNodeVectorSmoothStep.xml +++ b/doc/classes/VisualShaderNodeVectorSmoothStep.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorSmoothStep" inherits="VisualShaderNode" category="Core" version="3.2"> +<class name="VisualShaderNodeVectorSmoothStep" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -8,9 +8,6 @@ </tutorials> <methods> </methods> - <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ 0, Vector3( 0, 0, 0 ), 1, Vector3( 0, 0, 0 ), 2, Vector3( 0, 0, 0 ) ]" /> - </members> <constants> </constants> </class> diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml index 6845c81a13..07d82289a3 100644 --- a/doc/classes/WeakRef.xml +++ b/doc/classes/WeakRef.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="WeakRef" inherits="Reference" category="Core" version="3.2"> +<class name="WeakRef" inherits="Reference" version="4.0"> <brief_description> Holds an [Object], but does not contribute to the reference count if the object is a reference. </brief_description> diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml index 595aaeecee..befa820f9b 100644 --- a/doc/classes/WindowDialog.xml +++ b/doc/classes/WindowDialog.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="WindowDialog" inherits="Popup" category="Core" version="3.2"> +<class name="WindowDialog" inherits="Popup" version="4.0"> <brief_description> Base class for window dialogs. </brief_description> diff --git a/doc/classes/World.xml b/doc/classes/World.xml index c8e6944b83..361ec9b764 100644 --- a/doc/classes/World.xml +++ b/doc/classes/World.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="World" inherits="Resource" category="Core" version="3.2"> +<class name="World" inherits="Resource" version="4.0"> <brief_description> Class that has everything pertaining to a world. </brief_description> diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index 66ef18f8f4..9e2d4cfde3 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="World2D" inherits="Resource" category="Core" version="3.2"> +<class name="World2D" inherits="Resource" version="4.0"> <brief_description> Class that has everything pertaining to a 2D world. </brief_description> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index b4524bfea0..9c062ecfd0 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="WorldEnvironment" inherits="Node" category="Core" version="3.2"> +<class name="WorldEnvironment" inherits="Node" version="4.0"> <brief_description> Default environment properties for the entire scene (post-processing effects, lighting and background settings). </brief_description> diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index 50e9e4e0d4..d2b7b20cd6 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="X509Certificate" inherits="Resource" category="Core" version="3.2"> +<class name="X509Certificate" inherits="Resource" version="4.0"> <brief_description> An X509 certificate (e.g. for SSL). </brief_description> <description> The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource]. They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream]. + [b]Note:[/b] Not available in HTML5 exports. </description> <tutorials> </tutorials> diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 6989246e24..8140fde62d 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="XMLParser" inherits="Reference" category="Core" version="3.2"> +<class name="XMLParser" inherits="Reference" version="4.0"> <brief_description> Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/XML]XML[/url] files. </brief_description> @@ -84,7 +84,7 @@ <return type="int" enum="XMLParser.NodeType"> </return> <description> - Gets the type of the current node. Compare with [code]NODE_*[/code] constants. + Gets the type of the current node. Compare with [enum NodeType] constants. </description> </method> <method name="has_attribute" qualifiers="const"> @@ -147,25 +147,25 @@ </methods> <constants> <constant name="NODE_NONE" value="0" enum="NodeType"> - There's no node (no file or buffer opened) + There's no node (no file or buffer opened). </constant> <constant name="NODE_ELEMENT" value="1" enum="NodeType"> - Element (tag) + Element (tag). </constant> <constant name="NODE_ELEMENT_END" value="2" enum="NodeType"> - End of element + End of element. </constant> <constant name="NODE_TEXT" value="3" enum="NodeType"> - Text node + Text node. </constant> <constant name="NODE_COMMENT" value="4" enum="NodeType"> - Comment node + Comment node. </constant> <constant name="NODE_CDATA" value="5" enum="NodeType"> - CDATA content + CDATA content. </constant> <constant name="NODE_UNKNOWN" value="6" enum="NodeType"> - Unknown node + Unknown node. </constant> </constants> </class> diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml index 6045a5713c..4ef6a4b4ec 100644 --- a/doc/classes/YSort.xml +++ b/doc/classes/YSort.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="YSort" inherits="Node2D" category="Core" version="3.2"> +<class name="YSort" inherits="Node2D" version="4.0"> <brief_description> Sort all child nodes based on their Y positions. </brief_description> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 533963b460..4482a280b2 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -1,10 +1,41 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="bool" category="Built-In Types" version="3.2"> +<class name="bool" version="4.0"> <brief_description> Boolean built-in type. </brief_description> <description> - Boolean built-in type. + Boolean is a built-in type. It can represent any data type that is either a true or false value. You can think of it as an switch with on or off (1 or 0) setting. It's often used as part of programming logic in condition statements like [code]if[/code] statements. + [b]Note:[/b] In a code below [code]if can_shoot[/code] is equivalent of [code]if can_shoot == true[/code]. It is good practice to follow the natural spoken language structure when possible. Use [code]if can_shoot[/code] rather than [code]if can_shoot == true[/code] and use [code]if not can_shoot[/code] rather than [code]if can_shoot == false[/code]. + [codeblock] + var can_shoot = true + + func shoot(): + if can_shoot: + # Perform shooting actions here. + [/codeblock] + The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if [code]can_shoot[/code] is [code]true[/code]. + [b]Note:[/b] [code]Input.is_action_pressed("shoot")[/code] is also a boolean that is [code]true[/code] when "shoot" is pressed and [code]false[/code] when "shoot" isn't pressed. + [codeblock] + var can_shoot = true + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + [/codeblock] + The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again. + [codeblock] + var can_shoot = true + onready var cool_down = $CoolDownTimer + + func shoot(): + if can_shoot and Input.is_action_pressed("shoot"): + create_bullet() + can_shoot = false + cool_down.start() + + func _on_CoolDownTimer_timeout(): + can_shoot = true + [/codeblock] </description> <tutorials> </tutorials> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 4c4ea83157..16a696f959 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="float" category="Built-In Types" version="3.2"> +<class name="float" version="4.0"> <brief_description> - Float built-in type + Float built-in type. </brief_description> <description> Float built-in type. @@ -33,7 +33,7 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. + Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. Calling this method with an invalid float string will return 0. This method stops parsing at the first invalid character and will return the parsed result so far, so calling [code]float("1a3")[/code] will return 1 while calling [code]float("1e3a2")[/code] will return 1000.0. </description> </method> </methods> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index dad0f0d8c0..2c9f0ad371 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="int" category="Built-In Types" version="3.2"> +<class name="int" version="4.0"> <brief_description> Integer built-in type. </brief_description> @@ -8,16 +8,16 @@ It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. [int] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint. [codeblock] - var my_variant = 0 # int, value 0 - my_variant += 4.2 # float, value 4.2 - var my_int: int = 1 # int, value 1 - my_int = 4.2 # int, value 4, the right value is implicitly cast to int - my_int = int("6.7") # int, value 6, the String is explicitly cast with [method int] + var my_variant = 0 # int, value 0. + my_variant += 4.2 # float, value 4.2. + var my_int: int = 1 # int, value 1. + my_int = 4.2 # int, value 4, the right value is implicitly cast to int. + my_int = int("6.7") # int, value 6, the String is explicitly cast with int. var max_int = 9223372036854775807 - print(max_int) # 9223372036854775807, OK + print(max_int) # 9223372036854775807, OK. max_int += 1 - print(max_int) # -9223372036854775808, we overflowed and wrapped around + print(max_int) # -9223372036854775808, we overflowed and wrapped around. [/codeblock] </description> <tutorials> diff --git a/doc/tools/doc_merge.py b/doc/tools/doc_merge.py index 496d5dcb74..496d5dcb74 100644..100755 --- a/doc/tools/doc_merge.py +++ b/doc/tools/doc_merge.py diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 6e34cffc05..e6e6d5f606 100644..100755 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -69,8 +69,8 @@ long_flags = { 'empty': 'e', } -table_columns = ['name', 'brief_description', 'description', 'methods', 'constants', 'members', 'signals'] -table_column_names = ['Name', 'Brief Desc.', 'Desc.', 'Methods', 'Constants', 'Members', 'Signals'] +table_columns = ['name', 'brief_description', 'description', 'methods', 'constants', 'members', 'signals', 'theme_items'] +table_column_names = ['Name', 'Brief Desc.', 'Desc.', 'Methods', 'Constants', 'Members', 'Signals', 'Theme Items'] colors = { 'name': [36], # cyan 'part_big_problem': [4, 31], # underline, red @@ -81,6 +81,7 @@ colors = { 'section': [1, 4], # bold, underline 'state_off': [36], # cyan 'state_on': [1, 35], # bold, magenta/plum + 'bold': [1], # bold } overall_progress_description_weigth = 10 @@ -176,6 +177,7 @@ class ClassStatus: 'methods': ClassStatusProgress(), 'constants': ClassStatusProgress(), 'members': ClassStatusProgress(), + 'theme_items': ClassStatusProgress(), 'signals': ClassStatusProgress() } @@ -220,13 +222,13 @@ class ClassStatus: ) items_progress = ClassStatusProgress() - for k in ['methods', 'constants', 'members', 'signals']: + for k in ['methods', 'constants', 'members', 'signals', 'theme_items']: items_progress += self.progresses[k] output[k] = self.progresses[k].to_configured_colored_string() output['items'] = items_progress.to_configured_colored_string() - output['overall'] = (description_progress + items_progress).to_colored_string('{percent}%', '{pad_percent}{s}') + output['overall'] = (description_progress + items_progress).to_colored_string(color('bold', '{percent}%'), '{pad_percent}{s}') if self.name.startswith('Total'): output['url'] = color('url', 'https://docs.godotengine.org/en/latest/classes/') @@ -257,7 +259,7 @@ class ClassStatus: for sub_tag in list(tag): descr = sub_tag.find('description') status.progresses[tag.tag].increment(len(descr.text.strip()) > 0) - elif tag.tag in ['constants', 'members']: + elif tag.tag in ['constants', 'members', 'theme_items']: for sub_tag in list(tag): if not sub_tag.text is None: status.progresses[tag.tag].increment(len(sub_tag.text.strip()) > 0) @@ -300,7 +302,7 @@ for arg in sys.argv[1:]: sys.exit(1) if flags['i']: - for r in ['methods', 'constants', 'members', 'signals']: + for r in ['methods', 'constants', 'members', 'signals', 'theme_items']: index = table_columns.index(r) del table_column_names[index] del table_columns[index] @@ -308,7 +310,7 @@ if flags['i']: table_columns.append('items') if flags['o'] == (not flags['i']): - table_column_names.append('Overall') + table_column_names.append(color('bold', 'Overall')) table_columns.append('overall') if flags['u']: @@ -434,6 +436,11 @@ if len(table) > 2 or not flags['a']: row.append('') table.append(row) +if flags['a']: + # Duplicate the headers at the bottom of the table so they can be viewed + # without having to scroll back to the top. + table.append(table_column_names) + table_column_sizes = [] for row in table: for cell_i, cell in enumerate(row): @@ -459,7 +466,10 @@ for row_i, row in enumerate(table): print(row_string) - if row_i == 0 or row_i == len(table) - 2: + # Account for the possible double header (if the `a` flag is enabled). + # No need to have a condition for the flag, as this will behave correctly + # if the flag is disabled. + if row_i == 0 or row_i == len(table) - 3 or row_i == len(table) - 2: print(divider_string) print(divider_string) diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index ef38299680..9012de03b3 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -14,7 +14,7 @@ GODOT_DOCS_PATTERN = re.compile(r'^http(?:s)?://docs\.godotengine\.org/(?:[a-zA- def print_error(error, state): # type: (str, State) -> None - print(error) + print("ERROR: {}".format(error)) state.errored = True @@ -98,7 +98,6 @@ class ClassDef: self.methods = OrderedDict() # type: OrderedDict[str, List[MethodDef]] self.signals = OrderedDict() # type: OrderedDict[str, SignalDef] self.inherits = None # type: Optional[str] - self.category = None # type: Optional[str] self.brief_description = None # type: Optional[str] self.description = None # type: Optional[str] self.theme_items = None # type: Optional[OrderedDict[str, List[ThemeItemDef]]] @@ -122,10 +121,6 @@ class State: if inherits is not None: class_def.inherits = inherits - category = class_root.get("category") - if category is not None: - class_def.category = category - brief_desc = class_root.find("brief_description") if brief_desc is not None and brief_desc.text: class_def.brief_description = brief_desc.text @@ -148,6 +143,8 @@ class State: setter = property.get("setter") or None # Use or None so '' gets turned into None. getter = property.get("getter") or None default_value = property.get("default") or None + if default_value is not None: + default_value = '``{}``'.format(default_value) overridden = property.get("override") or False property_def = PropertyDef(property_name, type_name, setter, getter, property.text, default_value, overridden) @@ -391,15 +388,22 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write(make_type(child, state)) f.write("\n\n") - # Category - if class_def.category is not None: - f.write('**Category:** ' + class_def.category.strip() + "\n\n") - # Brief description - f.write(make_heading('Brief Description', '-')) if class_def.brief_description is not None: f.write(rstize_text(class_def.brief_description.strip(), state) + "\n\n") + # Class description + if class_def.description is not None and class_def.description.strip() != '': + f.write(make_heading('Description', '-')) + f.write(rstize_text(class_def.description.strip(), state) + "\n\n") + + # Online tutorials + if len(class_def.tutorials) > 0: + f.write(make_heading('Tutorials', '-')) + for t in class_def.tutorials: + link = t.strip() + f.write("- " + make_url(link) + "\n\n") + # Properties overview if len(class_def.properties) > 0: f.write(make_heading('Properties', '-')) @@ -492,18 +496,6 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write('\n\n') - # Class description - if class_def.description is not None and class_def.description.strip() != '': - f.write(make_heading('Description', '-')) - f.write(rstize_text(class_def.description.strip(), state) + "\n\n") - - # Online tutorials - if len(class_def.tutorials) > 0: - f.write(make_heading('Tutorials', '-')) - for t in class_def.tutorials: - link = t.strip() - f.write("- " + make_url(link) + "\n\n") - # Property descriptions if any(not p.overridden for p in class_def.properties.values()) > 0: f.write(make_heading('Property Descriptions', '-')) @@ -622,6 +614,40 @@ def make_class_list(class_list, columns): # type: (List[str], int) -> None f.close() +def escape_rst(text, until_pos=-1): # type: (str) -> str + # Escape \ character, otherwise it ends up as an escape character in rst + pos = 0 + while True: + pos = text.find('\\', pos, until_pos) + if pos == -1: + break + text = text[:pos] + "\\\\" + text[pos + 1:] + pos += 2 + + # Escape * character to avoid interpreting it as emphasis + pos = 0 + while True: + pos = text.find('*', pos, until_pos) + if pos == -1: + break + text = text[:pos] + "\*" + text[pos + 1:] + pos += 2 + + # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink + pos = 0 + while True: + pos = text.find('_', pos, until_pos) + if pos == -1: + break + if not text[pos + 1].isalnum(): # don't escape within a snake_case word + text = text[:pos] + "\_" + text[pos + 1:] + pos += 2 + else: + pos += 1 + + return text + + def rstize_text(text, state): # type: (str, State) -> str # Linebreak + tabs in the XML should become two line breaks unless in a "codeblock" pos = 0 @@ -677,36 +703,7 @@ def rstize_text(text, state): # type: (str, State) -> str pos += 2 next_brac_pos = text.find('[') - - # Escape \ character, otherwise it ends up as an escape character in rst - pos = 0 - while True: - pos = text.find('\\', pos, next_brac_pos) - if pos == -1: - break - text = text[:pos] + "\\\\" + text[pos + 1:] - pos += 2 - - # Escape * character to avoid interpreting it as emphasis - pos = 0 - while True: - pos = text.find('*', pos, next_brac_pos) - if pos == -1: - break - text = text[:pos] + "\*" + text[pos + 1:] - pos += 2 - - # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink - pos = 0 - while True: - pos = text.find('_', pos, next_brac_pos) - if pos == -1: - break - if not text[pos + 1].isalnum(): # don't escape within a snake_case word - text = text[:pos] + "\_" + text[pos + 1:] - pos += 2 - else: - pos += 1 + text = escape_rst(text, next_brac_pos) # Handle [tags] inside_code = False @@ -879,6 +876,7 @@ def rstize_text(text, state): # type: (str, State) -> str inside_code = True elif cmd.startswith('enum '): tag_text = make_enum(cmd[5:], state) + escape_post = True else: tag_text = make_type(tag_text, state) escape_post = True @@ -975,7 +973,11 @@ def make_enum(t, state): # type: (str, State) -> str if c in state.classes and e in state.classes[c].enums: return ":ref:`{0}<enum_{1}_{0}>`".format(e, c) - print_error("Unresolved enum '{}', file: {}".format(t, state.current_class), state) + + # Don't fail for `Vector3.Axis`, as this enum is a special case which is expected not to be resolved. + if "{}.{}".format(c, e) != "Vector3.Axis": + print_error("Unresolved enum '{}', file: {}".format(t, state.current_class), state) + return t |