diff options
Diffstat (limited to 'doc')
37 files changed, 354 insertions, 104 deletions
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index bc64cfbb19..97da8c9980 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -34,7 +34,7 @@ <method name="animation_track_get_key_animation" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -44,7 +44,7 @@ <method name="animation_track_insert_key"> <return type="int"> </return> - <argument index="0" name="track" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -56,7 +56,7 @@ <method name="animation_track_set_key_animation"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -68,7 +68,7 @@ <method name="audio_track_get_key_end_offset" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -78,7 +78,7 @@ <method name="audio_track_get_key_start_offset" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -88,7 +88,7 @@ <method name="audio_track_get_key_stream" qualifiers="const"> <return type="Resource"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -98,7 +98,7 @@ <method name="audio_track_insert_key"> <return type="int"> </return> - <argument index="0" name="track" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -114,7 +114,7 @@ <method name="audio_track_set_key_end_offset"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -126,7 +126,7 @@ <method name="audio_track_set_key_start_offset"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -138,7 +138,7 @@ <method name="audio_track_set_key_stream"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -150,7 +150,7 @@ <method name="bezier_track_get_key_in_handle" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -160,7 +160,7 @@ <method name="bezier_track_get_key_out_handle" qualifiers="const"> <return type="Vector2"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -170,7 +170,7 @@ <method name="bezier_track_get_key_value" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -180,7 +180,7 @@ <method name="bezier_track_insert_key"> <return type="int"> </return> - <argument index="0" name="track" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -196,7 +196,7 @@ <method name="bezier_track_interpolate" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="track" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -206,7 +206,7 @@ <method name="bezier_track_set_key_in_handle"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -218,7 +218,7 @@ <method name="bezier_track_set_key_out_handle"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -230,7 +230,7 @@ <method name="bezier_track_set_key_value"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -249,7 +249,7 @@ <method name="copy_track"> <return type="void"> </return> - <argument index="0" name="track" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="to_animation" type="Animation"> </argument> @@ -276,7 +276,7 @@ <method name="method_track_get_key_indices" qualifiers="const"> <return type="PoolIntArray"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time_sec" type="float"> </argument> @@ -289,7 +289,7 @@ <method name="method_track_get_name" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -300,7 +300,7 @@ <method name="method_track_get_params" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -311,7 +311,7 @@ <method name="remove_track"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Removes a track by specifying the track index. @@ -320,7 +320,7 @@ <method name="track_find_key" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -333,7 +333,7 @@ <method name="track_get_interpolation_loop_wrap" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default. @@ -342,7 +342,7 @@ <method name="track_get_interpolation_type" qualifiers="const"> <return type="int" enum="Animation.InterpolationType"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Returns the interpolation type of a given track. @@ -351,7 +351,7 @@ <method name="track_get_key_count" qualifiers="const"> <return type="int"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Returns the amount of keys in a given track. @@ -360,7 +360,7 @@ <method name="track_get_key_time" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -371,7 +371,7 @@ <method name="track_get_key_transition" qualifiers="const"> <return type="float"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -382,7 +382,7 @@ <method name="track_get_key_value" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -393,7 +393,7 @@ <method name="track_get_path" qualifiers="const"> <return type="NodePath"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Gets the path of a track. For more information on the path format, see [method track_set_path]. @@ -402,7 +402,7 @@ <method name="track_get_type" qualifiers="const"> <return type="int" enum="Animation.TrackType"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Gets the type of a track. @@ -411,7 +411,7 @@ <method name="track_insert_key"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -426,7 +426,7 @@ <method name="track_is_enabled" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Returns [code]true[/code] if the track at index [code]idx[/code] is enabled. @@ -435,7 +435,7 @@ <method name="track_is_imported" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code]. @@ -444,7 +444,7 @@ <method name="track_move_down"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Moves a track down. @@ -453,7 +453,7 @@ <method name="track_move_to"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="to_idx" type="int"> </argument> @@ -464,7 +464,7 @@ <method name="track_move_up"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Moves a track up. @@ -473,7 +473,7 @@ <method name="track_remove_key"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -484,7 +484,7 @@ <method name="track_remove_key_at_position"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="position" type="float"> </argument> @@ -495,7 +495,7 @@ <method name="track_set_enabled"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="enabled" type="bool"> </argument> @@ -506,7 +506,7 @@ <method name="track_set_imported"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="imported" type="bool"> </argument> @@ -517,7 +517,7 @@ <method name="track_set_interpolation_loop_wrap"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="interpolation" type="bool"> </argument> @@ -528,7 +528,7 @@ <method name="track_set_interpolation_type"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType"> </argument> @@ -539,7 +539,7 @@ <method name="track_set_key_time"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -552,7 +552,7 @@ <method name="track_set_key_transition"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key_idx" type="int"> </argument> @@ -565,7 +565,7 @@ <method name="track_set_key_value"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="key" type="int"> </argument> @@ -578,7 +578,7 @@ <method name="track_set_path"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="path" type="NodePath"> </argument> @@ -590,7 +590,7 @@ <method name="track_swap"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="with_idx" type="int"> </argument> @@ -601,7 +601,7 @@ <method name="transform_track_insert_key"> <return type="int"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time" type="float"> </argument> @@ -618,7 +618,7 @@ <method name="transform_track_interpolate" qualifiers="const"> <return type="Array"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time_sec" type="float"> </argument> @@ -629,7 +629,7 @@ <method name="value_track_get_key_indices" qualifiers="const"> <return type="PoolIntArray"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="time_sec" type="float"> </argument> @@ -642,7 +642,7 @@ <method name="value_track_get_update_mode" qualifiers="const"> <return type="int" enum="Animation.UpdateMode"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <description> Returns the update mode of a value track. @@ -651,7 +651,7 @@ <method name="value_track_set_update_mode"> <return type="void"> </return> - <argument index="0" name="idx" type="int"> + <argument index="0" name="track_idx" type="int"> </argument> <argument index="1" name="mode" type="int" enum="Animation.UpdateMode"> </argument> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index c71a06d931..d8ea7fea5b 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -125,7 +125,7 @@ </methods> <members> <member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles" default="true"> - If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point]. + If [code]true[/code], the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point]. </member> <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode" default="0"> Controls the interpolation between animations. See [enum BlendMode] constants. diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 5bb4a6e3c7..60d04649a8 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -5,6 +5,7 @@ </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. + Updating the target properties of animations occurs at process time. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link> @@ -28,7 +29,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 and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. </description> </method> <method name="animation_get_next" qualifiers="const"> @@ -145,6 +146,7 @@ <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]. </description> </method> <method name="play_backwards"> @@ -157,6 +159,7 @@ <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. </description> </method> <method name="queue"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index e1cb9056da..9a5870c73d 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -7,6 +7,7 @@ 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link> </tutorials> <methods> <method name="get_collision_layer_bit" qualifiers="const"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index a1529f3eb3..e09c1f4b08 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -316,7 +316,7 @@ <argument index="3" name="deep" type="bool" default="False"> </argument> <description> - Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is true. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. + Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. </description> </method> <method name="sort"> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 87b8f5c83d..8372d15324 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -22,6 +22,28 @@ Called (if exists) to draw the canvas item. </description> </method> + <method name="draw_arc"> + <return type="void"> + </return> + <argument index="0" name="center" type="Vector2"> + </argument> + <argument index="1" name="radius" type="float"> + </argument> + <argument index="2" name="start_angle" type="float"> + </argument> + <argument index="3" name="end_angle" type="float"> + </argument> + <argument index="4" name="point_count" type="int"> + </argument> + <argument index="5" name="color" type="Color"> + </argument> + <argument index="6" name="width" type="float" default="1.0"> + </argument> + <argument index="7" name="antialiased" type="bool" default="false"> + </argument> + <description> + </description> + </method> <method name="draw_char"> <return type="float"> </return> @@ -341,6 +363,7 @@ <return type="void"> </return> <description> + Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. </description> </method> <method name="get_canvas" qualifiers="const"> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 05ffac803a..f5a8683a39 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -62,7 +62,7 @@ </argument> <description> Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. Use [code]for_text[/code] parameter to determine what text the tooltip should contain (likely the contents of [member hint_tooltip]). - The returned node must be of type [Control] or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When null or non-Control node is returned, the default tooltip will be used instead. + The returned node must be of type [Control] or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When [code]null[/code] or non-Control node is returned, the default tooltip will be used instead. [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member rect_min_size] to some non-zero value. Example of usage with custom-constructed node: [codeblock] diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index cab5af3985..a713e06585 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -6,7 +6,7 @@ <description> This plugins allows adding custom property editors to [EditorInspector]. Plugins are registered via [method EditorPlugin.add_inspector_plugin]. - When an object is edited, the [method can_handle] function is called and must return true if the object type is supported. + When an object is edited, the [method can_handle] function is called and must return [code]true[/code] if the object type is supported. If supported, the function [method parse_begin] will be called, allowing to place custom controls at the beginning of the class. Subsequently, the [method parse_category] and [method parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too. Finally [method parse_end] will be called. @@ -54,7 +54,7 @@ <argument index="0" name="object" type="Object"> </argument> <description> - Returns true if this object can be handled by this plugin. + Returns [code]true[/code] if this object can be handled by this plugin. </description> </method> <method name="parse_begin" qualifiers="virtual"> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml new file mode 100644 index 0000000000..bf01ebfe82 --- /dev/null +++ b/doc/classes/EditorSpinSlider.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorSpinSlider" inherits="Range" category="Core" version="3.2"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> + </member> + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> + <member name="label" type="String" setter="set_label" getter="get_label" default=""""> + </member> + <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 1a2d5cab81..52e4b94051 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -44,6 +44,7 @@ </return> <description> Returns the response's body length. + [b]Note:[/b] Some Web servers may not send a body length. In this case, the value returned will be [code]-1[/code]. If using chunked transfer encoding, the body length will also be [code]-1[/code]. </description> </method> <method name="get_response_code" qualifiers="const"> @@ -175,7 +176,7 @@ <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] + Sets the size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk]. </description> </method> </methods> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 53ee0b6132..3a73d44a01 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -23,6 +23,7 @@ </return> <description> Returns the response body length. + [b]Note:[/b] Some Web servers may not send a body length. In this case, the value returned will be [code]-1[/code]. If using chunked transfer encoding, the body length will also be [code]-1[/code]. </description> </method> <method name="get_downloaded_bytes" qualifiers="const"> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index d297bc98ae..d37ab64cb3 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -415,7 +415,7 @@ <argument index="1" name="grayscale" type="bool" default="false"> </argument> <description> - Saves the image as an EXR file to [code]path[/code]. If grayscale is true and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module. + Saves the image as an EXR file to [code]path[/code]. If grayscale is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module. </description> </method> <method name="save_png" qualifiers="const"> @@ -456,6 +456,15 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code] if the image is locked. Note that the [code]dst[/code] values must be integers. Example: + [codeblock] + var img = Image.new() + img.create(img_width, img_height, false, Image.FORMAT_RGBA8) + img.lock() + img.set_pixelv(Vector2(x, y), color) # Works + img.unlock() + img.set_pixelv(Vector2(x, y), color) # Does not have an effect + [/codeblock] </description> </method> <method name="shrink_x2"> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index fab4cc0fb9..cb89a746bf 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -4,7 +4,7 @@ Input event type for mouse motion events. </brief_description> <description> - Contains mouse motion information. Supports relative, absolute positions and speed. See [method Node._input]. + Contains mouse and pen motion information. Supports relative, absolute positions and speed. See [method Node._input]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link> @@ -18,6 +18,12 @@ <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )"> The mouse speed in pixels per second. </member> + <member name="pressure" type="float" setter="set_pressure" getter="get_pressure"> + Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code]. + </member> + <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt"> + Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes. + </member> </members> <constants> </constants> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 9e65da8eea..9457800825 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -167,6 +167,17 @@ </description> </method> </methods> + <signals> + <signal name="on_request_permissions_result"> + <argument index="0" name="permission" type="String"> + </argument> + <argument index="1" name="granted" type="bool"> + </argument> + <description> + Emitted when an user responds to permission request. + </description> + </signal> + </signals> <constants> <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002"> Notification received from the OS when the mouse enters the game window. diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index f6c7a7d1b5..6528704bb5 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -107,6 +107,10 @@ </member> <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" default="0"> </member> + <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0"> + </member> + <member name="geometry/source_group_name" type="String" setter="set_source_group_name" getter="get_source_group_name"> + </member> <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> </member> <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index b206d4a4d2..1f685aab81 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -40,8 +40,9 @@ <return type="String"> </return> <description> - The string returned from this method is displayed as a warning in the "Scene Dock" if the script that overrides it is a [code]tool[/code] script. + The string returned from this method is displayed as a warning in the Scene Dock if the script that overrides it is a [code]tool[/code] script. Returning an empty string produces no warning. + Call [method update_configuration_warning] when the warning needs to be updated for this node. </description> </method> <method name="_input" qualifiers="virtual"> @@ -818,6 +819,14 @@ Sets whether this is an instance load placeholder. See [InstancePlaceholder]. </description> </method> + <method name="update_configuration_warning"> + <return type="void"> + </return> + <description> + Updates the warning displayed for this node in the Scene Dock. + Use [method _get_configuration_warning] to setup the warning message to display. + </description> + </method> </methods> <members> <member name="custom_multiplayer" type="MultiplayerAPI" setter="set_custom_multiplayer" getter="get_custom_multiplayer"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 9e1b25abe1..5aeeb61647 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -157,6 +157,8 @@ <return type="PoolStringArray"> </return> <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]. </description> </method> <method name="get_current_video_driver" qualifiers="const"> @@ -217,6 +219,13 @@ Returns the path to the current engine executable. </description> </method> + <method name="get_granted_permissions" qualifiers="const"> + <return type="PoolStringArray"> + </return> + <description> + With this function you can get the list of dangerous permissions that have been granted to the Android application. + </description> + </method> <method name="get_ime_selection" qualifiers="const"> <return type="Vector2"> </return> @@ -692,6 +701,7 @@ <return type="void"> </return> <description> + Initialises the singleton for the system MIDI driver. </description> </method> <method name="print_all_resources"> @@ -744,6 +754,13 @@ At the moment this function is only used by [code]AudioDriverOpenSL[/code] to request permission for [code]RECORD_AUDIO[/code] on Android. </description> </method> + <method name="request_permissions"> + <return type="bool"> + </return> + <description> + With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application. + </description> + </method> <method name="set_icon"> <return type="void"> </return> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index fb74c5a3d4..7bfea8bce4 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -24,6 +24,7 @@ <argument index="0" name="pass" type="int"> </argument> <description> + Returns the [Mesh] that is drawn at index [code]pass[/code]. </description> </method> <method name="restart"> @@ -41,6 +42,7 @@ <argument index="1" name="mesh" type="Mesh"> </argument> <description> + Sets the [Mesh] that is drawn at index [code]pass[/code]. </description> </method> </methods> diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml index 21bf078017..867f042cd2 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PoolByteArray.xml @@ -53,6 +53,13 @@ Returns a new [PoolByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> <method name="get_string_from_ascii"> <return type="String"> </return> diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml index a1fb868ef5..34cfa0ab53 100644 --- a/doc/classes/PoolColorArray.xml +++ b/doc/classes/PoolColorArray.xml @@ -33,6 +33,13 @@ Appends a [PoolColorArray] at the end of this array. </description> </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> <method name="insert"> <return type="int"> </return> diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml index 28a28b2bba..25e1e718f7 100644 --- a/doc/classes/PoolIntArray.xml +++ b/doc/classes/PoolIntArray.xml @@ -34,6 +34,13 @@ Appends a [PoolIntArray] at the end of this array. </description> </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> <method name="insert"> <return type="int"> </return> diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml index 7eaec82338..e8afe46640 100644 --- a/doc/classes/PoolRealArray.xml +++ b/doc/classes/PoolRealArray.xml @@ -33,6 +33,13 @@ Appends a [PoolRealArray] at the end of this array. </description> </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> <method name="insert"> <return type="int"> </return> diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml index a408a18b19..f41a3c7a68 100644 --- a/doc/classes/PoolStringArray.xml +++ b/doc/classes/PoolStringArray.xml @@ -33,6 +33,13 @@ Appends a [PoolStringArray] at the end of this array. </description> </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> <method name="insert"> <return type="int"> </return> diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml index 623247e639..321846d08b 100644 --- a/doc/classes/PoolVector2Array.xml +++ b/doc/classes/PoolVector2Array.xml @@ -33,6 +33,13 @@ Appends a [PoolVector2Array] at the end of this array. </description> </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> <method name="insert"> <return type="int"> </return> diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml index adc28b46cb..c82bd62a11 100644 --- a/doc/classes/PoolVector3Array.xml +++ b/doc/classes/PoolVector3Array.xml @@ -33,6 +33,13 @@ Appends a [PoolVector3Array] at the end of this array. </description> </method> + <method name="empty"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> <method name="insert"> <return type="int"> </return> diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml index d85f568abf..939453b977 100644 --- a/doc/classes/PopupDialog.xml +++ b/doc/classes/PopupDialog.xml @@ -12,4 +12,9 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="panel" type="StyleBox"> + Sets a custom [StyleBox] for the panel of the [PopupDialog]. + </theme_item> + </theme_items> </class> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 691aec2eb1..bdb6ca84ee 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -444,7 +444,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Sets the type of the item at the specified index [code]idx[/code] to radio button. If false, sets the type of the item to plain text. + Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text. </description> </method> <method name="set_item_as_separator"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 9657982016..eb937df286 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -6,6 +6,7 @@ <description> Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog. + [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. </description> <tutorials> </tutorials> @@ -144,6 +145,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Sets the specified property's initial value. This is the value the property reverts to. </description> </method> <method name="set_order"> @@ -165,6 +167,11 @@ <argument index="1" name="value" type="Variant"> </argument> <description> + Sets the value of a setting. + [b]Example:[/b] + [codeblock] + ProjectSettings.set_setting("application/config/name", "Example") + [/codeblock] </description> </method> </methods> @@ -201,6 +208,7 @@ </member> <member name="application/config/project_settings_override" type="String" setter="" getter="" default=""""> Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. + [b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings (see this class' description at the top). </member> <member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false"> 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]. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index faf2ac1ff9..2962391b99 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -16,8 +16,13 @@ </return> <argument index="0" name="image" type="Texture"> </argument> + <argument index="1" name="width" type="int" default="0"> + </argument> + <argument index="2" name="height" type="int" default="0"> + </argument> <description> - Adds an image's opening and closing tags to the tag stack. + Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image. + If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. </description> </method> <method name="add_text"> @@ -128,6 +133,18 @@ Adds an [code][align][/code] tag based on the given [code]align[/code] value. See [enum Align] for possible values. </description> </method> + <method name="push_bold"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="push_bold_italics"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="push_cell"> <return type="void"> </return> @@ -162,6 +179,12 @@ Adds an [code][indent][/code] tag to the tag stack. Multiplies "level" by current tab_size to determine new margin length. </description> </method> + <method name="push_italics"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="push_list"> <return type="void"> </return> @@ -180,6 +203,18 @@ Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types. </description> </method> + <method name="push_mono"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="push_normal"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="push_strikethrough"> <return type="void"> </return> diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody.xml index 5cde31fa59..93f02c0e01 100644 --- a/doc/classes/SoftBody.xml +++ b/doc/classes/SoftBody.xml @@ -7,6 +7,7 @@ A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html</link> </tutorials> <methods> <method name="add_collision_exception_with"> @@ -43,12 +44,6 @@ Returns an individual bit on the collision mask. </description> </method> - <method name="is_ray_pickable" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> <method name="remove_collision_exception_with"> <return type="void"> </return> @@ -80,25 +75,20 @@ Sets individual bits on the collision mask. Use this if you only need to change one layer's value. </description> </method> - <method name="set_ray_pickable"> - <return type="void"> - </return> - <argument index="0" name="ray_pickable" type="bool"> - </argument> - <description> - </description> - </method> </methods> <members> + <member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="false"> + If [code]true[/code], the [SoftBody] will respond to [RayCast]s. + </member> <member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness" default="0.5"> </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The physics layers this area is in. + The physics layers this SoftBody is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this area scans for collisions. + The physics layers this SoftBody scans for collisions. </member> <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> </member> @@ -107,6 +97,7 @@ <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5"> </member> <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath("")"> + [NodePath] to a [CollisionObject] this SoftBody should avoid clipping. </member> <member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient" default="0.0"> </member> @@ -116,6 +107,7 @@ Increasing this value will improve the resulting simulation, but can affect performance. Use with care. </member> <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0"> + The SoftBody's mass. </member> <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.5"> </member> diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index 09a5bf3b8f..0309e73eec 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -15,6 +15,7 @@ <return type="void"> </return> <description> + Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. </description> </method> <method name="get_parent_spatial" qualifiers="const"> @@ -48,6 +49,7 @@ <argument index="0" name="scale" type="Vector3"> </argument> <description> + Scales the global (world) transformation by the given [Vector3] scale factors. </description> </method> <method name="global_translate"> @@ -77,6 +79,7 @@ <return type="bool"> </return> <description> + Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. </description> </method> <method name="is_set_as_toplevel" qualifiers="const"> @@ -206,6 +209,7 @@ <argument index="0" name="disable" type="bool"> </argument> <description> + Sets whether the node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. Changes to the local transformation scale are preserved. </description> </method> <method name="set_identity"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 8a114efd34..e883341107 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -54,7 +54,7 @@ <return type="void"> </return> <description> - Clears all the syntax coloring information. + Clears all custom syntax coloring information previously added with [method add_color_region] or [method add_keyword_color]. </description> </method> <method name="clear_undo_history"> @@ -94,7 +94,7 @@ </argument> <description> Moves the cursor at the specified [code]column[/code] index. - If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. + If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. </description> </method> <method name="cursor_set_line"> @@ -110,8 +110,8 @@ </argument> <description> Moves the cursor at the specified [code]line[/code] index. - If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. - If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [method set_line_as_hidden]. + If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. + If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden using [method set_line_as_hidden]. </description> </method> <method name="cut"> @@ -310,7 +310,15 @@ <argument index="3" name="from_column" type="int"> </argument> <description> - Perform a search inside the text. Search flags can be specified in the[code]SEARCH_*[/code] enum. + Perform a search inside the text. Search flags can be specified in the [code]SEARCH_*[/code] enum. + Returns an empty [code]PoolIntArray[/code] if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [code]SEARCH_RESULT_*[/code] enum, e.g: + [codeblock] + var result = search(key, flags, line, column) + if result.size() > 0: + # result found + var res_line = result[TextEdit.SEARCH_RESULT_LINE] + var res_column = result[TextEdit.SEARCH_RESULT_COLUMN] + [/codeblock] </description> </method> <method name="select"> @@ -504,6 +512,12 @@ <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags"> Search from end to beginning. </constant> + <constant name="SEARCH_RESULT_COLUMN" value="0" enum="SearchResult"> + Used to access the result column from [member search]. + </constant> + <constant name="SEARCH_RESULT_LINE" value="1" enum="SearchResult"> + Used to access the result line from [member search]. + </constant> <constant name="MENU_CUT" value="0" enum="MenuItems"> Cuts (Copies and clears) the selected text. </constant> @@ -530,7 +544,7 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled. </theme_item> <theme_item name="bookmark_color" type="Color" default="Color( 0.08, 0.49, 0.98, 1 )"> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index e4db9243ef..dd12c5af23 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -15,6 +15,7 @@ <return type="void"> </return> <description> + Clears all values on the theme. </description> </method> <method name="clear_color"> @@ -85,6 +86,7 @@ <argument index="0" name="other" type="Theme"> </argument> <description> + Sets the Theme's values to a copy of a given theme. </description> </method> <method name="get_color" qualifiers="const"> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 2215f26c23..804489f7f1 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -16,7 +16,7 @@ Returns the video stream's name. </description> </method> - <method name="get_video_texture"> + <method name="get_video_texture" qualifiers="const"> <return type="Texture"> </return> <description> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index f0f03b6c21..15216948e4 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShader" inherits="Shader" category="Core" version="3.2"> <brief_description> + A custom shader program with a visual editor. </brief_description> <description> + This class allows you to define a custom shader program that can be used for various materials to render objects. + The visual shader editor creates the shader. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeCubeMap.xml b/doc/classes/VisualShaderNodeCubeMap.xml index 36465a6b4d..29ebe95086 100644 --- a/doc/classes/VisualShaderNodeCubeMap.xml +++ b/doc/classes/VisualShaderNodeCubeMap.xml @@ -12,10 +12,16 @@ <member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map"> </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"> + </member> <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType" default="0"> </member> </members> <constants> + <constant name="SOURCE_TEXTURE" value="0" enum="Source"> + </constant> + <constant name="SOURCE_PORT" value="1" enum="Source"> + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> </constant> <constant name="TYPE_COLOR" value="1" enum="TextureType"> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 1b27e4a35a..ef38299680 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -435,21 +435,30 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S # Signals if len(class_def.signals) > 0: f.write(make_heading('Signals', '-')) + index = 0 + for signal in class_def.signals.values(): - #f.write(".. _class_{}_{}:\n\n".format(class_name, signal.name)) + if index != 0: + f.write('----\n\n') + f.write(".. _class_{}_signal_{}:\n\n".format(class_name, signal.name)) _, signature = make_method_signature(class_def, signal, False, state) f.write("- {}\n\n".format(signature)) - if signal.description is None or signal.description.strip() == '': - continue - f.write(rstize_text(signal.description.strip(), state)) - f.write("\n\n") + if signal.description is not None and signal.description.strip() != '': + f.write(rstize_text(signal.description.strip(), state) + '\n\n') + + index += 1 # Enums if len(class_def.enums) > 0: f.write(make_heading('Enumerations', '-')) + index = 0 + for e in class_def.enums.values(): + if index != 0: + f.write('----\n\n') + f.write(".. _enum_{}_{}:\n\n".format(class_name, e.name)) # Sphinx seems to divide the bullet list into individual <ul> tags if we weave the labels into it. # As such I'll put them all above the list. Won't be perfect but better than making the list visually broken. @@ -463,8 +472,11 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write("- **{}** = **{}**".format(value.name, value.value)) if value.text is not None and value.text.strip() != '': f.write(' --- ' + rstize_text(value.text.strip(), state)) + f.write('\n\n') + index += 1 + # Constants if len(class_def.constants) > 0: f.write(make_heading('Constants', '-')) @@ -477,6 +489,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write("- **{}** = **{}**".format(constant.name, constant.value)) if constant.text is not None and constant.text.strip() != '': f.write(' --- ' + rstize_text(constant.text.strip(), state)) + f.write('\n\n') # Class description @@ -494,11 +507,15 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S # Property descriptions if any(not p.overridden for p in class_def.properties.values()) > 0: f.write(make_heading('Property Descriptions', '-')) + index = 0 + for property_def in class_def.properties.values(): if property_def.overridden: continue - #f.write(".. _class_{}_{}:\n\n".format(class_name, property_def.name)) + if index != 0: + f.write('----\n\n') + f.write(".. _class_{}_property_{}:\n\n".format(class_name, property_def.name)) f.write('- {} **{}**\n\n'.format(property_def.type_name.to_rst(state), property_def.name)) @@ -514,24 +531,30 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S format_table(f, info) if property_def.text is not None and property_def.text.strip() != '': - f.write(rstize_text(property_def.text.strip(), state)) - f.write('\n\n') + f.write(rstize_text(property_def.text.strip(), state) + '\n\n') + + index += 1 # Method descriptions if len(class_def.methods) > 0: f.write(make_heading('Method Descriptions', '-')) + index = 0 + for method_list in class_def.methods.values(): for i, m in enumerate(method_list): + if index != 0: + f.write('----\n\n') + if i == 0: - #f.write(".. _class_{}_{}:\n\n".format(class_name, m.name)) f.write(".. _class_{}_method_{}:\n\n".format(class_name, m.name)) + ret_type, signature = make_method_signature(class_def, m, False, state) f.write("- {} {}\n\n".format(ret_type, signature)) - if m.description is None or m.description.strip() == '': - continue - f.write(rstize_text(m.description.strip(), state)) - f.write("\n\n") + if m.description is not None and m.description.strip() != '': + f.write(rstize_text(m.description.strip(), state) + '\n\n') + + index += 1 def make_class_list(class_list, columns): # type: (List[str], int) -> None @@ -897,7 +920,7 @@ def rstize_text(text, state): # type: (str, State) -> str def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterable[Tuple[str, ...]]) -> None if len(data) == 0: return - + column_sizes = [0] * len(data[0]) for row in data: for i, text in enumerate(row): @@ -912,7 +935,7 @@ def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterabl sep += "+" + "-" * (size + 2) sep += "+\n" f.write(sep) - + for row in data: row_text = "|" for i, text in enumerate(row): |