diff options
Diffstat (limited to 'doc/classes')
46 files changed, 426 insertions, 136 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index fce0341292..7acec9e63b 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2652,6 +2652,8 @@ <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags"> Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector]. </constant> + <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags"> + </constant> <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags"> The property does not save its state in [PackedScene]. </constant> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 9026aa6a34..189e30b5f2 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -88,7 +88,7 @@ <argument index="3" name="seek_root" type="bool" /> <argument index="4" name="blend" type="float" /> <argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> - <argument index="6" name="optimize" type="bool" default="true" /> + <argument index="6" name="sync" type="bool" default="true" /> <description> 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> @@ -102,7 +102,7 @@ <argument index="4" name="seek_root" type="bool" /> <argument index="5" name="blend" type="float" /> <argument index="6" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> - <argument index="7" name="optimize" type="bool" default="true" /> + <argument index="7" name="sync" type="bool" default="true" /> <description> Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition. </description> diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index ca117e3ecd..e6ac1dd963 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" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="AnimationNodeAdd2" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Blends two animations additively inside of an [AnimationNodeBlendTree]. </brief_description> @@ -9,9 +9,4 @@ <tutorials> <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link> </tutorials> - <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> - If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. - </member> - </members> </class> diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 91e030a6ae..f290032e11 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" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="AnimationNodeAdd3" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Blends two of three animations additively inside of an [AnimationNodeBlendTree]. </brief_description> @@ -14,9 +14,4 @@ <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> - If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. - </member> - </members> </class> diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index f17163e155..5001e3ba24 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" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="AnimationNodeBlend2" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Blends two animations linearly inside of an [AnimationNodeBlendTree]. </brief_description> @@ -11,9 +11,4 @@ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> - <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> - If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. - </member> - </members> </class> diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index 6bc7a20823..93947c2462 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" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="AnimationNodeBlend3" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Blends two of three animations linearly inside of an [AnimationNodeBlendTree]. </brief_description> @@ -13,9 +13,4 @@ <tutorials> <link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link> </tutorials> - <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> - If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. - </member> - </members> </class> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index 6ded3a7ff9..7bb136308d 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -76,6 +76,10 @@ <member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.1"> Position increment to snap to when moving a point on the axis. </member> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> + If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code]. + If [code]true[/code], forcing the blended animations to advance frame. + </member> <member name="value_label" type="String" setter="set_value_label" getter="get_value_label" default=""value""> Label of the virtual axis of the blend space. </member> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 9e0e408ac5..eb2249d2d2 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -113,6 +113,10 @@ <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0.1, 0.1)"> Position increment to snap to when moving a point. </member> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> + If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code]. + If [code]true[/code], forcing the blended animations to advance frame. + </member> <member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default=""x""> Name of the blend space's X axis. </member> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index de2414cd43..14abc34992 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="AnimationNodeOneShot" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Plays an animation once in [AnimationNodeBlendTree]. </brief_description> @@ -26,8 +26,6 @@ </member> <member name="mix_mode" type="int" setter="set_mix_mode" getter="get_mix_mode" enum="AnimationNodeOneShot.MixMode" default="0"> </member> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> - </member> </members> <constants> <constant name="MIX_MODE_BLEND" value="0" enum="MixMode"> diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 206164d675..0badb831de 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -23,7 +23,7 @@ Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code. </member> <member name="advance_expression_base_node" type="NodePath" setter="set_advance_expression_base_node" getter="get_advance_expression_base_node" default="NodePath("")"> - The path to the [Node] used to evaluate an [Expression] if one is not explictly specified internally. + The path to the [Node] used to evaluate an [Expression] if one is not explicitly specified internally. </member> <member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false"> Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END]. diff --git a/doc/classes/AnimationNodeSync.xml b/doc/classes/AnimationNodeSync.xml new file mode 100644 index 0000000000..21cac11d50 --- /dev/null +++ b/doc/classes/AnimationNodeSync.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AnimationNodeSync" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> + If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code]. + If [code]true[/code], forcing the blended animations to advance frame. + </member> + </members> +</class> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index 70c874d251..7e757d4640 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="AnimationNodeTransition" inherits="AnimationNodeSync" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> A generic animation transition node for [AnimationTree]. </brief_description> @@ -40,6 +40,9 @@ </method> </methods> <members> + <member name="from_start" type="bool" setter="set_from_start" getter="is_from_start" default="true"> + If [code]true[/code], the destination animation is played back from the beginning when switched. + </member> <member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0"> The number of available input ports for this node. </member> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index ecac228a26..45d9152564 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -38,7 +38,7 @@ If [code]true[/code], the [AnimationTree] will be processing. </member> <member name="advance_expression_base_node" type="NodePath" setter="set_advance_expression_base_node" getter="get_advance_expression_base_node" default="NodePath(".")"> - The path to the [Node] used to evaluate the AnimationNode [Expression] if one is not explictly specified internally. + The path to the [Node] used to evaluate the AnimationNode [Expression] if one is not explicitly specified internally. </member> <member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath("")"> The path to the [AnimationPlayer] used for animating. diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 56e5ce1522..468fddcfc1 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -155,6 +155,7 @@ </member> <member name="current" type="bool" setter="set_current" getter="is_current" default="false"> If [code]true[/code], the ancestor [Viewport] is currently using this camera. + If multiple cameras are in the scene, one will always be made current. For example, if two [Camera3D] nodes are present in the scene and only one is current, setting one camera's [member current] to [code]false[/code] will cause the other camera to be made current. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera3D.DopplerTracking" default="0"> 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. diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index acf08414d0..2d68ae6902 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -169,9 +169,10 @@ <argument index="5" name="font_size" type="int" default="16" /> <argument index="6" name="max_lines" type="int" default="-1" /> <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="8" name="flags" type="int" default="99" /> - <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> - <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> + <argument index="8" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" /> + <argument index="9" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> + <argument index="10" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. </description> @@ -187,9 +188,10 @@ <argument index="6" name="max_lines" type="int" default="-1" /> <argument index="7" name="size" type="int" default="1" /> <argument index="8" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="9" name="flags" type="int" default="99" /> - <argument index="10" name="direction" type="int" enum="TextServer.Direction" default="0" /> - <argument index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> + <argument index="9" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" /> + <argument index="10" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> + <argument index="11" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Breaks [code]text[/code] to the lines and draws text outline using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. </description> @@ -279,7 +281,7 @@ <argument index="4" name="width" type="float" default="-1" /> <argument index="5" name="font_size" type="int" default="16" /> <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="7" name="flags" type="int" default="3" /> + <argument index="7" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> <argument index="8" name="direction" type="int" enum="TextServer.Direction" default="0" /> <argument index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> @@ -316,7 +318,7 @@ <argument index="5" name="font_size" type="int" default="16" /> <argument index="6" name="size" type="int" default="1" /> <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="8" name="flags" type="int" default="3" /> + <argument index="8" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 2846b564b4..9fc80e1aab 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1281,8 +1281,8 @@ <constant name="PRESET_HCENTER_WIDE" value="14" enum="LayoutPreset"> Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset]. </constant> - <constant name="PRESET_WIDE" value="15" enum="LayoutPreset"> - Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset]. + <constant name="PRESET_FULL_RECT" value="15" enum="LayoutPreset"> + Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_MODE_MINSIZE" value="0" enum="LayoutPresetMode"> The control will be resized to its minimum size. diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 8aa2db2cf8..f217fbaf48 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -96,7 +96,7 @@ Adds a static lib from the given [code]path[/code] to the iOS project. </description> </method> - <method name="add_osx_plugin_file"> + <method name="add_macos_plugin_file"> <return type="void" /> <argument index="0" name="path" type="String" /> <description> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 1514b82ff8..2930c2ec22 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -296,6 +296,28 @@ <return type="bool" /> <description> Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]). + When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of [method EditorInterface.get_base_control] and made visible inside [method _make_visible]. + Use [method _get_plugin_name] and [method _get_plugin_icon] to customize the plugin button's appearance. + [codeblock] + var plugin_control + + func _enter_tree(): + plugin_control = preload("my_plugin_control.tscn").instantiate() + get_editor_interface().get_editor_main_control().add_child(plugin_control) + plugin_control.hide() + + func _has_main_screen(): + return true + + func _make_visible(visible): + plugin_control.visible = visible + + func _get_plugin_name(): + return "My Super Cool Plugin 3000" + + func _get_plugin_icon(): + return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons") + [/codeblock] </description> </method> <method name="_make_visible" qualifiers="virtual"> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index b19386b398..e95f444d55 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -44,9 +44,10 @@ <argument index="5" name="font_size" type="int" default="16" /> <argument index="6" name="max_lines" type="int" default="-1" /> <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="8" name="flags" type="int" default="99" /> - <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> - <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> + <argument index="8" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" /> + <argument index="9" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> + <argument index="10" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_multiline_string]. @@ -63,9 +64,10 @@ <argument index="6" name="max_lines" type="int" default="-1" /> <argument index="7" name="size" type="int" default="1" /> <argument index="8" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="9" name="flags" type="int" default="99" /> - <argument index="10" name="direction" type="int" enum="TextServer.Direction" default="0" /> - <argument index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> + <argument index="9" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" /> + <argument index="10" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> + <argument index="11" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws text outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_multiline_string_outline]. @@ -80,7 +82,7 @@ <argument index="4" name="width" type="float" default="-1" /> <argument index="5" name="font_size" type="int" default="16" /> <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="7" name="flags" type="int" default="3" /> + <argument index="7" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> <argument index="8" name="direction" type="int" enum="TextServer.Direction" default="0" /> <argument index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> @@ -98,7 +100,7 @@ <argument index="5" name="font_size" type="int" default="16" /> <argument index="6" name="size" type="int" default="1" /> <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="8" name="flags" type="int" default="3" /> + <argument index="8" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> <argument index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> <argument index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> @@ -160,7 +162,7 @@ </description> </method> <method name="get_font_style" qualifiers="const"> - <return type="int" /> + <return type="int" enum="TextServer.FontStyle" /> <description> Returns font style flags, see [enum TextServer.FontStyle]. </description> @@ -186,9 +188,10 @@ <argument index="2" name="width" type="float" default="-1" /> <argument index="3" name="font_size" type="int" default="16" /> <argument index="4" name="max_lines" type="int" default="-1" /> - <argument index="5" name="flags" type="int" default="96" /> - <argument index="6" name="direction" type="int" enum="TextServer.Direction" default="0" /> - <argument index="7" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> + <argument index="5" name="brk_flags" type="int" enum="TextServer.LineBreakFlag" default="3" /> + <argument index="6" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> + <argument index="7" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="8" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. See also [method draw_multiline_string]. @@ -219,7 +222,7 @@ <argument index="1" name="alignment" type="int" enum="HorizontalAlignment" default="0" /> <argument index="2" name="width" type="float" default="-1" /> <argument index="3" name="font_size" type="int" default="16" /> - <argument index="4" name="flags" type="int" default="3" /> + <argument index="4" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> <argument index="5" name="direction" type="int" enum="TextServer.Direction" default="0" /> <argument index="6" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml index 98abc87b84..aaf871d55a 100644 --- a/doc/classes/FontFile.xml +++ b/doc/classes/FontFile.xml @@ -558,7 +558,7 @@ <member name="font_name" type="String" setter="set_font_name" getter="get_font_name" default=""""> Font family name. </member> - <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" default="0"> + <member name="font_style" type="int" setter="set_font_style" getter="get_font_style" enum="TextServer.FontStyle" default="0"> Font style flags, see [enum TextServer.FontStyle]. </member> <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="is_force_autohinter" default="false"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index f138b9087b..3d2e9449e2 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -251,6 +251,7 @@ Maximum number of allowed redirects. </member> <member name="timeout" type="float" setter="set_timeout" getter="get_timeout" default="0.0"> + If set to a value greater than [code]0.0[/code] before the request starts, the HTTP request will time out after [code]timeout[/code] seconds have passed and the request is not [i]completed[/i] yet. For small HTTP requests such as REST API usage, set [member timeout] to a value between [code]10.0[/code] and [code]30.0[/code] to prevent the application from getting stuck if the request fails to get a response in a timely manner. For file downloads, leave this to [code]0.0[/code] to prevent the download from failing if it takes too much time. </member> <member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads" default="false"> If [code]true[/code], multithreading is used to improve performance. diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 31bd938c40..a927345e79 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -23,8 +23,8 @@ <method name="blend_rect"> <return type="void" /> <argument index="0" name="src" type="Image" /> - <argument index="1" name="src_rect" type="Rect2" /> - <argument index="2" name="dst" type="Vector2" /> + <argument index="1" name="src_rect" type="Rect2i" /> + <argument index="2" name="dst" type="Vector2i" /> <description> Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dest[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty. </description> @@ -33,8 +33,8 @@ <return type="void" /> <argument index="0" name="src" type="Image" /> <argument index="1" name="mask" type="Image" /> - <argument index="2" name="src_rect" type="Rect2" /> - <argument index="3" name="dst" type="Vector2" /> + <argument index="2" name="src_rect" type="Rect2i" /> + <argument index="3" name="dst" type="Vector2i" /> <description> Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image using [code]mask[/code] image at coordinates [code]dst[/code], clipped accordingly to both image bounds. Alpha channels are required for both [code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and [code]src[/code] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty. </description> @@ -42,8 +42,8 @@ <method name="blit_rect"> <return type="void" /> <argument index="0" name="src" type="Image" /> - <argument index="1" name="src_rect" type="Rect2" /> - <argument index="2" name="dst" type="Vector2" /> + <argument index="1" name="src_rect" type="Rect2i" /> + <argument index="2" name="dst" type="Vector2i" /> <description> Copies [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dst[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty. </description> @@ -52,8 +52,8 @@ <return type="void" /> <argument index="0" name="src" type="Image" /> <argument index="1" name="mask" type="Image" /> - <argument index="2" name="src_rect" type="Rect2" /> - <argument index="3" name="dst" type="Vector2" /> + <argument index="2" name="src_rect" type="Rect2i" /> + <argument index="3" name="dst" type="Vector2i" /> <description> Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code], clipped accordingly to both image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty. </description> @@ -168,7 +168,7 @@ </method> <method name="fill_rect"> <return type="void" /> - <argument index="0" name="rect" type="Rect2" /> + <argument index="0" name="rect" type="Rect2i" /> <argument index="1" name="color" type="Color" /> <description> Fills [code]rect[/code] with [code]color[/code]. @@ -244,7 +244,7 @@ </method> <method name="get_rect" qualifiers="const"> <return type="Image" /> - <argument index="0" name="rect" type="Rect2" /> + <argument index="0" name="rect" type="Rect2i" /> <description> Returns a new image that is a copy of the image's area specified with [code]rect[/code]. </description> @@ -256,9 +256,9 @@ </description> </method> <method name="get_used_rect" qualifiers="const"> - <return type="Rect2" /> + <return type="Rect2i" /> <description> - Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. + Returns a [Rect2i] 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"> @@ -378,6 +378,19 @@ Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. </description> </method> + <method name="rotate_180"> + <return type="void" /> + <description> + Rotates the image by [code]180[/code] degrees. The width and height of the image must be greater than [code]1[/code]. + </description> + </method> + <method name="rotate_90"> + <return type="void" /> + <argument index="0" name="direction" type="int" enum="ClockDirection" /> + <description> + Rotates the image in the specified [code]direction[/code] by [code]90[/code] degrees. The width and height of the image must be greater than [code]1[/code]. If the width and height are not equal, the image will be resized. + </description> + </method> <method name="save_exr" qualifiers="const"> <return type="int" enum="Error" /> <argument index="0" name="path" type="String" /> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index e668e2e7fd..084bf7e809 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -42,9 +42,17 @@ Returns the format of the texture, one of [enum Image.Format]. </description> </method> + <method name="set_image"> + <return type="void" /> + <argument index="0" name="image" type="Image" /> + <description> + Replaces the texture's data with a new [Image]. This will re-allocate new memory for the texture. + If you want to update the image, but don't need to change its parameters (format, size), use [method update] instead for better performance. + </description> + </method> <method name="set_size_override"> <return type="void" /> - <argument index="0" name="size" type="Vector2" /> + <argument index="0" name="size" type="Vector2i" /> <description> Resizes the texture to the specified dimensions. </description> @@ -54,8 +62,8 @@ <argument index="0" name="image" type="Image" /> <description> Replaces the texture's data with a new [Image]. - [b]Note:[/b] The texture has to be initialized first with the [method create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [method create_from_image] method. - Use this method over [method create_from_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time. + [b]Note:[/b] The texture has to be created using [method create_from_image] or initialized first with the [method set_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration. + Use this method over [method set_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time. </description> </method> </methods> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 1eac58b9f2..8448109f02 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -49,6 +49,9 @@ <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0"> Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. </member> + <member name="label_settings" type="LabelSettings" setter="set_label_settings" getter="get_label_settings"> + Resource to override [Theme] font, outline and shadow properties. + </member> <member name="language" type="String" setter="set_language" getter="get_language" default=""""> Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </member> diff --git a/doc/classes/LabelSettings.xml b/doc/classes/LabelSettings.xml new file mode 100644 index 0000000000..5f7427f4aa --- /dev/null +++ b/doc/classes/LabelSettings.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="LabelSettings" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Resource to override [Theme] font, outline and shadow properties of the [Label]. + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="font" type="Font" setter="set_font" getter="get_font"> + [Font] of the [Label]'s text. + </member> + <member name="font_color" type="Color" setter="set_font_color" getter="get_font_color" default="Color(0.875, 0.875, 0.875, 1)"> + Default text [Color] of the [Label]. + </member> + <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="16"> + Font size of the [Label]'s text. + </member> + <member name="line_spacing" type="float" setter="set_line_spacing" getter="get_line_spacing" default="0.0"> + Vertical space between lines in multiline text. + </member> + <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color(1, 1, 1, 1)"> + The tint of text outline. + </member> + <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0"> + Text outline size. + </member> + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color(1, 1, 1, 1)"> + The tint of text shadow. + </member> + <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2(1, 1)"> + The offset of the text's shadow. + </member> + <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="0"> + The size of the text's shadow. + </member> + </members> +</class> diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml index 20113ac309..13f44150d7 100644 --- a/doc/classes/LightmapGIData.xml +++ b/doc/classes/LightmapGIData.xml @@ -22,7 +22,7 @@ <method name="clear_users"> <return type="void" /> <description> - Clear all objects that are considred baked within this [LightmapGIData]. + Clear all objects that are considered baked within this [LightmapGIData]. </description> </method> <method name="get_user_count" qualifiers="const"> diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml index bc702adde6..d47e52d7c0 100644 --- a/doc/classes/MovieWriter.xml +++ b/doc/classes/MovieWriter.xml @@ -68,7 +68,7 @@ <return type="void" /> <argument index="0" name="writer" type="MovieWriter" /> <description> - Adds a writer to be usable by the engine. The supported file extensions can be set by overridding [method _handles_file]. + Adds a writer to be usable by the engine. The supported file extensions can be set by overriding [method _handles_file]. [b]Note:[/b] [method add_writer] must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine. </description> </method> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 631b2ea050..9d8f1e1e5d 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -91,7 +91,8 @@ <member name="custom_data_array" type="PackedColorArray" setter="_set_custom_data_array" getter="_get_custom_data_array"> </member> <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0"> - Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count]. + Number of instances that will get drawn. This clears and (re)sizes the buffers. Setting data format or flags afterwards will have no effect. + By default, all instances are drawn but you can limit this with [member visible_instance_count]. </member> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> Mesh to be drawn. diff --git a/doc/classes/MultiplayerSpawner.xml b/doc/classes/MultiplayerSpawner.xml index 4ca92728ff..9de67068eb 100644 --- a/doc/classes/MultiplayerSpawner.xml +++ b/doc/classes/MultiplayerSpawner.xml @@ -43,8 +43,6 @@ </method> </methods> <members> - <member name="auto_spawn" type="bool" setter="set_auto_spawning" getter="is_auto_spawning" default="false"> - </member> <member name="spawn_limit" type="int" setter="set_spawn_limit" getter="get_spawn_limit" default="0"> </member> <member name="spawn_path" type="NodePath" setter="set_spawn_path" getter="get_spawn_path" default="NodePath("")"> diff --git a/doc/classes/MultiplayerSynchronizer.xml b/doc/classes/MultiplayerSynchronizer.xml index ac067791e6..3766491a6c 100644 --- a/doc/classes/MultiplayerSynchronizer.xml +++ b/doc/classes/MultiplayerSynchronizer.xml @@ -6,12 +6,64 @@ </description> <tutorials> </tutorials> + <methods> + <method name="add_visibility_filter"> + <return type="void" /> + <argument index="0" name="filter" type="Callable" /> + <description> + </description> + </method> + <method name="get_visibility_for" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="peer" type="int" /> + <description> + </description> + </method> + <method name="remove_visibility_filter"> + <return type="void" /> + <argument index="0" name="filter" type="Callable" /> + <description> + </description> + </method> + <method name="set_visibility_for"> + <return type="void" /> + <argument index="0" name="peer" type="int" /> + <argument index="1" name="visible" type="bool" /> + <description> + </description> + </method> + <method name="update_visibility"> + <return type="void" /> + <argument index="0" name="for_peer" type="int" default="0" /> + <description> + </description> + </method> + </methods> <members> + <member name="public_visibility" type="bool" setter="set_visibility_public" getter="is_visibility_public" default="true"> + </member> <member name="replication_config" type="SceneReplicationConfig" setter="set_replication_config" getter="get_replication_config"> </member> <member name="replication_interval" type="float" setter="set_replication_interval" getter="get_replication_interval" default="0.0"> </member> <member name="root_path" type="NodePath" setter="set_root_path" getter="get_root_path" default="NodePath("..")"> </member> + <member name="visibility_update_mode" type="int" setter="set_visibility_update_mode" getter="get_visibility_update_mode" enum="MultiplayerSynchronizer.VisibilityUpdateMode" default="0"> + </member> </members> + <signals> + <signal name="visibility_changed"> + <argument index="0" name="for_peer" type="int" /> + <description> + </description> + </signal> + </signals> + <constants> + <constant name="VISIBILITY_PROCESS_IDLE" value="0" enum="VisibilityUpdateMode"> + </constant> + <constant name="VISIBILITY_PROCESS_PHYSICS" value="1" enum="VisibilityUpdateMode"> + </constant> + <constant name="VISIBILITY_PROCESS_NONE" value="2" enum="VisibilityUpdateMode"> + </constant> + </constants> </class> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index a42ceba777..33e9e0c92d 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -77,15 +77,15 @@ <return type="float" /> <argument index="0" name="point" type="Vector3" /> <description> - Returns the shortest distance from the plane to the position [code]point[/code]. + Returns the shortest distance from the plane to the position [code]point[/code]. If the point is above the plane, the distance will be positive. If below, the distance will be negative. </description> </method> <method name="has_point" qualifiers="const"> <return type="bool" /> <argument index="0" name="point" type="Vector3" /> - <argument index="1" name="epsilon" type="float" default="1e-05" /> + <argument index="1" name="tolerance" type="float" default="1e-05" /> <description> - Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold. + Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]tolerance[/code] threshold. </description> </method> <method name="intersect_3" qualifiers="const"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 577abc159a..898d34b385 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1968,6 +1968,12 @@ 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. [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]). </member> + <member name="rendering/vrs/mode" type="int" setter="" getter="" default="0"> + Set the default Variable Rate Shading (VRS) mode for the main viewport. See [member Viewport.vrs_mode] to change this at runtime, and [enum Viewport.VRSMode] for possible values. + </member> + <member name="rendering/vrs/texture" type="String" setter="" getter="" default=""""> + If [member rendering/vrs/mode] is set to texture, this is the path to default texture loaded as the VRS image. + </member> <member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64"> </member> <member name="rendering/vulkan/rendering/back_end" type="int" setter="" getter="" default="0"> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 0d121a29d2..6248394b1a 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -395,7 +395,7 @@ <description> </description> </method> - <method name="limit_get"> + <method name="limit_get" qualifiers="const"> <return type="int" /> <argument index="0" name="limit" type="int" enum="RenderingDevice.Limit" /> <description> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 99f2191dee..6199c7b4e6 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -3357,6 +3357,22 @@ If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [XRInterface]. </description> </method> + <method name="viewport_set_vrs_mode"> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.ViewportVRSMode" /> + <description> + Sets the Variable Rate Shading (VRS) mode for the viewport. Note, if hardware does not support VRS this property is ignored. + </description> + </method> + <method name="viewport_set_vrs_texture"> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="texture" type="RID" /> + <description> + Texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE]. + </description> + </method> <method name="visibility_notifier_create"> <return type="RID" /> <description> @@ -4116,6 +4132,18 @@ </constant> <constant name="VIEWPORT_DEBUG_DRAW_MOTION_VECTORS" value="25" enum="ViewportDebugDraw"> </constant> + <constant name="VIEWPORT_VRS_DISABLED" value="0" enum="ViewportVRSMode"> + VRS is disabled. + </constant> + <constant name="VIEWPORT_VRS_TEXTURE" value="1" enum="ViewportVRSMode"> + VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. + </constant> + <constant name="VIEWPORT_VRS_XR" value="2" enum="ViewportVRSMode"> + VRS texture is supplied by the primary [XRInterface]. + </constant> + <constant name="VIEWPORT_VRS_MAX" value="3" enum="ViewportVRSMode"> + Represents the size of the [enum ViewportVRSMode] enum. + </constant> <constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode"> </constant> <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index d6e9a233b0..dd52d09750 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -6,6 +6,7 @@ <description> Singleton used to load resource files from the filesystem. It uses the many [ResourceFormatLoader] classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. + [b]Note:[/b] You have to import the files into the engine first to load them using [method load]. If you want to load [Image]s at run-time, you may use [method Image.load]. If you want to import audio files, you can use the snippet described in [member AudioStreamMP3.data]. </description> <tutorials> <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> @@ -17,7 +18,7 @@ <argument index="1" name="at_front" type="bool" default="false" /> <description> Registers a new [ResourceFormatLoader]. The ResourceLoader will use the ResourceFormatLoader as described in [method load]. - This method is performed implictly for ResourceFormatLoaders written in GDScript (see [ResourceFormatLoader] for more information). + This method is performed implicitly for ResourceFormatLoaders written in GDScript (see [ResourceFormatLoader] for more information). </description> </method> <method name="exists"> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index 213d8c585a..240c72a131 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -16,7 +16,7 @@ <argument index="1" name="at_front" type="bool" default="false" /> <description> Registers a new [ResourceFormatSaver]. The ResourceSaver will use the ResourceFormatSaver as described in [method save]. - This method is performed implictly for ResourceFormatSavers written in GDScript (see [ResourceFormatSaver] for more information). + This method is performed implicitly for ResourceFormatSavers written in GDScript (see [ResourceFormatSaver] for more information). </description> </method> <method name="get_recognized_extensions"> diff --git a/doc/classes/SkeletonProfile.xml b/doc/classes/SkeletonProfile.xml index 55a2ea6759..a7f5f7a0a6 100644 --- a/doc/classes/SkeletonProfile.xml +++ b/doc/classes/SkeletonProfile.xml @@ -9,6 +9,13 @@ <tutorials> </tutorials> <methods> + <method name="find_bone" qualifiers="const"> + <return type="int" /> + <argument index="0" name="bone_name" type="StringName" /> + <description> + Returns the bone index that matches [code]bone_name[/code] as its name. + </description> + </method> <method name="get_bone_name" qualifiers="const"> <return type="StringName" /> <argument index="0" name="bone_idx" type="int" /> @@ -17,6 +24,20 @@ In the retargeting process, the returned bone name is the bone name of the target skeleton. </description> </method> + <method name="get_bone_parent" qualifiers="const"> + <return type="StringName" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Returns the name of the bone which is the parent to the bone at [code]bone_idx[/code]. The result is empty if the bone has no parent. + </description> + </method> + <method name="get_bone_tail" qualifiers="const"> + <return type="StringName" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Returns the name of the bone which is the tail of the bone at [code]bone_idx[/code]. + </description> + </method> <method name="get_group" qualifiers="const"> <return type="StringName" /> <argument index="0" name="bone_idx" type="int" /> @@ -39,6 +60,20 @@ This is the offset with origin at the top left corner of the square. </description> </method> + <method name="get_reference_pose" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Returns the reference pose transform for bone [code]bone_idx[/code]. + </description> + </method> + <method name="get_tail_direction" qualifiers="const"> + <return type="int" enum="SkeletonProfile.TailDirection" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Returns the tail direction of the bone at [code]bone_idx[/code]. + </description> + </method> <method name="get_texture" qualifiers="const"> <return type="Texture2D" /> <argument index="0" name="group_idx" type="int" /> @@ -55,6 +90,22 @@ In the retargeting process, the setting bone name is the bone name of the target skeleton. </description> </method> + <method name="set_bone_parent"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="bone_parent" type="StringName" /> + <description> + Sets the bone with name [code]bone_parent[/code] as the parent of the bone at [code]bone_idx[/code]. If an empty string is passed, then the bone has no parent. + </description> + </method> + <method name="set_bone_tail"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="bone_tail" type="StringName" /> + <description> + Sets the bone with name [code]bone_tail[/code] as the tail of the bone at [code]bone_idx[/code]. + </description> + </method> <method name="set_group"> <return type="void" /> <argument index="0" name="bone_idx" type="int" /> @@ -80,6 +131,23 @@ This is the offset with origin at the top left corner of the square. </description> </method> + <method name="set_reference_pose"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="bone_name" type="Transform3D" /> + <description> + Sets the reference pose transform for bone [code]bone_idx[/code]. + </description> + </method> + <method name="set_tail_direction"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="tail_direction" type="int" enum="SkeletonProfile.TailDirection" /> + <description> + Sets the tail direction of the bone at [code]bone_idx[/code]. + [b]Note:[/b] This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally. + </description> + </method> <method name="set_texture"> <return type="void" /> <argument index="0" name="group_idx" type="int" /> @@ -103,4 +171,15 @@ </description> </signal> </signals> + <constants> + <constant name="TAIL_DIRECTION_AVERAGE_CHILDREN" value="0" enum="TailDirection"> + Direction to the average coordinates of bone children. + </constant> + <constant name="TAIL_DIRECTION_SPECIFIC_CHILD" value="1" enum="TailDirection"> + Direction to the coordinates of specified bone child. + </constant> + <constant name="TAIL_DIRECTION_END" value="2" enum="TailDirection"> + Direction is not calculated. + </constant> + </constants> </class> diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index c3574980b1..601650db2e 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -148,8 +148,8 @@ <member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0"> Text writing direction. </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags" default="3"> - Line Alignment rules. For more info see [TextServer]. + <member name="flags" type="int" setter="set_flags" getter="get_flags" enum="TextServer.JustificationFlag" default="3"> + Line alignment rules. For more info see [TextServer]. </member> <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="TextServer.Orientation" default="0"> Text orientation. diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index 6d615bd404..c733d8fcee 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -263,14 +263,17 @@ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="HorizontalAlignment" default="0"> Paragraph horizontal alignment. </member> + <member name="break_flags" type="int" setter="set_break_flags" getter="get_break_flags" enum="TextServer.LineBreakFlag" default="3"> + Line breaking rules. For more info see [TextServer]. + </member> <member name="custom_punctuation" type="String" setter="set_custom_punctuation" getter="get_custom_punctuation" default=""""> Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. </member> <member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0"> Text writing direction. </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags" default="99"> - Line breaking and alignment rules. For more info see [TextServer]. + <member name="justification_flags" type="int" setter="set_justification_flags" getter="get_justification_flags" enum="TextServer.JustificationFlag" default="3"> + Line alignment rules. For more info see [TextServer]. </member> <member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1"> Limits the lines of text shown. diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 4c8cf3982e..e1b676427b 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -356,7 +356,7 @@ </description> </method> <method name="font_get_style" qualifiers="const"> - <return type="int" /> + <return type="int" enum="TextServer.FontStyle" /> <argument index="0" name="font_rid" type="RID" /> <description> Returns font style flags, see [enum FontStyle]. @@ -786,7 +786,7 @@ <method name="font_set_style"> <return type="void" /> <argument index="0" name="font_rid" type="RID" /> - <argument index="1" name="style" type="int" /> + <argument index="1" name="style" type="int" enum="TextServer.FontStyle" /> <description> Sets the font style flags, see [enum FontStyle]. </description> @@ -1077,7 +1077,7 @@ <return type="float" /> <argument index="0" name="shaped" type="RID" /> <argument index="1" name="width" type="float" /> - <argument index="2" name="jst_flags" type="int" default="3" /> + <argument index="2" name="jst_flags" type="int" enum="TextServer.JustificationFlag" default="3" /> <description> Adjusts text with to fit to specified width, returns new text width. </description> @@ -1184,7 +1184,7 @@ <argument index="0" name="shaped" type="RID" /> <argument index="1" name="width" type="float" /> <argument index="2" name="start" type="int" default="0" /> - <argument index="3" name="break_flags" type="int" default="96" /> + <argument index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" default="3" /> <description> Breaks text to the lines and returns character ranges for each line. </description> @@ -1195,7 +1195,7 @@ <argument index="1" name="width" type="PackedFloat32Array" /> <argument index="2" name="start" type="int" default="0" /> <argument index="3" name="once" type="bool" default="true" /> - <argument index="4" name="break_flags" type="int" default="96" /> + <argument index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" default="3" /> <description> Breaks text to the lines and columns. Returns character ranges for each segment. </description> @@ -1306,7 +1306,7 @@ <method name="shaped_text_get_word_breaks" qualifiers="const"> <return type="PackedInt32Array" /> <argument index="0" name="shaped" type="RID" /> - <argument index="1" name="grapheme_flags" type="int" default="264" /> + <argument index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" default="264" /> <description> Breaks text into words and returns array of character ranges. Use [code]grapheme_flags[/code] to set what characters are used for breaking (see [enum GraphemeFlag]). </description> @@ -1346,7 +1346,7 @@ <return type="void" /> <argument index="0" name="shaped" type="RID" /> <argument index="1" name="width" type="float" default="0" /> - <argument index="2" name="overrun_trim_flags" type="int" default="0" /> + <argument index="2" name="overrun_trim_flags" type="int" enum="TextServer.TextOverrunFlag" default="0" /> <description> Trims text if it exceeds the given width. </description> @@ -1522,22 +1522,22 @@ Left to right text is written vertically from top to bottom. Right to left text is written vertically from bottom to top. </constant> - <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag"> + <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag" is_bitfield="true"> Do not justify text. </constant> - <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag"> + <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag" is_bitfield="true"> Justify text by adding and removing kashidas. </constant> - <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag"> + <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag" is_bitfield="true"> Justify text by changing width of the spaces between the words. </constant> - <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag"> + <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag" is_bitfield="true"> Remove trailing and leading spaces from the justified text. </constant> - <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag"> + <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag" is_bitfield="true"> Only apply justification to the part of the text after the last tab. </constant> - <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag"> + <constant name="JUSTIFICATION_CONSTRAIN_ELLIPSIS" value="16" enum="JustificationFlag" is_bitfield="true"> Apply justification to the trimmed line with ellipsis. </constant> <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode"> @@ -1552,20 +1552,19 @@ <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode"> Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line. </constant> - <constant name="BREAK_NONE" value="0" enum="LineBreakFlag"> + <constant name="BREAK_NONE" value="0" enum="LineBreakFlag" is_bitfield="true"> Do not break the line. </constant> - <constant name="BREAK_MANDATORY" value="32" enum="LineBreakFlag"> + <constant name="BREAK_MANDATORY" value="1" enum="LineBreakFlag" is_bitfield="true"> Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]). </constant> - <constant name="BREAK_WORD_BOUND" value="64" enum="LineBreakFlag"> + <constant name="BREAK_WORD_BOUND" value="2" enum="LineBreakFlag" is_bitfield="true"> Break the line between the words. </constant> - <constant name="BREAK_GRAPHEME_BOUND" value="128" enum="LineBreakFlag"> + <constant name="BREAK_GRAPHEME_BOUND" value="4" enum="LineBreakFlag" is_bitfield="true"> Break the line between any unconnected graphemes. </constant> - <constant name="BREAK_WORD_BOUND_ADAPTIVE" value="320" enum="LineBreakFlag"> - Break the line between the words, or any unconnected graphemes if line is too short to fit the whole word. + <constant name="BREAK_ADAPTIVE" value="8" enum="LineBreakFlag" is_bitfield="true"> </constant> <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior"> Trims text before the shaping. e.g, increasing [member Label.visible_characters] or [member RichTextLabel.visible_characters] value is visually identical to typing the text. @@ -1597,54 +1596,54 @@ <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior"> Trims the text per word and adds an ellipsis to indicate that parts are hidden. </constant> - <constant name="OVERRUN_NO_TRIM" value="0" enum="TextOverrunFlag"> + <constant name="OVERRUN_NO_TRIM" value="0" enum="TextOverrunFlag" is_bitfield="true"> No trimming is performed. </constant> - <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag"> + <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag" is_bitfield="true"> Trims the text when it exceeds the given width. </constant> - <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag"> + <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag" is_bitfield="true"> Trims the text per word instead of per grapheme. </constant> - <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag"> + <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag" is_bitfield="true"> Determines whether an ellipsis should be added at the end of the text. </constant> - <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag"> + <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag" is_bitfield="true"> Determines whether the ellipsis at the end of the text is enforced and may not be hidden. </constant> - <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag"> + <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag" is_bitfield="true"> </constant> - <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag" is_bitfield="true"> Grapheme is supported by the font, and can be drawn. </constant> - <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag" is_bitfield="true"> Grapheme is part of right-to-left or bottom-to-top run. </constant> - <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag" is_bitfield="true"> Grapheme is not part of source text, it was added by justification process. </constant> - <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag" is_bitfield="true"> Grapheme is whitespace. </constant> - <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag" is_bitfield="true"> Grapheme is mandatory break point (e.g. [code]"\n"[/code]). </constant> - <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag" is_bitfield="true"> Grapheme is optional break point (e.g. space). </constant> - <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag" is_bitfield="true"> Grapheme is the tabulation character. </constant> - <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag" is_bitfield="true"> Grapheme is kashida. </constant> - <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag" is_bitfield="true"> Grapheme is punctuation character. </constant> - <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_UNDERSCORE" value="512" enum="GraphemeFlag" is_bitfield="true"> Grapheme is underscore character. </constant> - <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag"> + <constant name="GRAPHEME_IS_CONNECTED" value="1024" enum="GraphemeFlag" is_bitfield="true"> Grapheme is connected to the previous grapheme. Breaking line before this grapheme is not safe. </constant> <constant name="HINTING_NONE" value="0" enum="Hinting"> @@ -1737,13 +1736,15 @@ <constant name="SPACING_BOTTOM" value="3" enum="SpacingType"> Spacing at the bottom of the line. </constant> - <constant name="FONT_BOLD" value="1" enum="FontStyle"> + <constant name="SPACING_MAX" value="4" enum="SpacingType"> + </constant> + <constant name="FONT_BOLD" value="1" enum="FontStyle" is_bitfield="true"> Font is bold. </constant> - <constant name="FONT_ITALIC" value="2" enum="FontStyle"> + <constant name="FONT_ITALIC" value="2" enum="FontStyle" is_bitfield="true"> Font is italic or oblique. </constant> - <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle"> + <constant name="FONT_FIXED_WIDTH" value="4" enum="FontStyle" is_bitfield="true"> Font have fixed-width characters. </constant> <constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser"> diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index 2f7b31b663..4501ec744a 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -346,7 +346,7 @@ </description> </method> <method name="font_get_style" qualifiers="virtual const"> - <return type="int" /> + <return type="int" enum="TextServer.FontStyle" /> <argument index="0" name="font_rid" type="RID" /> <description> Returns font style flags, see [enum TextServer.FontStyle]. @@ -782,7 +782,7 @@ <method name="font_set_style" qualifiers="virtual"> <return type="void" /> <argument index="0" name="font_rid" type="RID" /> - <argument index="1" name="style" type="int" /> + <argument index="1" name="style" type="int" enum="TextServer.FontStyle" /> <description> Sets the font style flags, see [enum TextServer.FontStyle]. </description> @@ -1074,7 +1074,7 @@ <return type="float" /> <argument index="0" name="shaped" type="RID" /> <argument index="1" name="width" type="float" /> - <argument index="2" name="jst_flags" type="int" /> + <argument index="2" name="jst_flags" type="int" enum="TextServer.JustificationFlag" /> <description> Adjusts text with to fit to specified width, returns new text width. </description> @@ -1183,7 +1183,7 @@ <argument index="0" name="shaped" type="RID" /> <argument index="1" name="width" type="float" /> <argument index="2" name="start" type="int" /> - <argument index="3" name="break_flags" type="int" /> + <argument index="3" name="break_flags" type="int" enum="TextServer.LineBreakFlag" /> <description> Breaks text to the lines and returns character ranges for each line. [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used. @@ -1195,7 +1195,7 @@ <argument index="1" name="width" type="PackedFloat32Array" /> <argument index="2" name="start" type="int" /> <argument index="3" name="once" type="bool" /> - <argument index="4" name="break_flags" type="int" /> + <argument index="4" name="break_flags" type="int" enum="TextServer.LineBreakFlag" /> <description> Breaks text to the lines and columns. Returns character ranges for each segment. [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used. @@ -1308,7 +1308,7 @@ <method name="shaped_text_get_word_breaks" qualifiers="virtual const"> <return type="PackedInt32Array" /> <argument index="0" name="shaped" type="RID" /> - <argument index="1" name="grapheme_flags" type="int" /> + <argument index="1" name="grapheme_flags" type="int" enum="TextServer.GraphemeFlag" /> <description> Breaks text into words and returns array of character ranges. [b]Note:[/b] If this method is not implemented in the plugin, the default implementation will be used. @@ -1352,7 +1352,7 @@ <return type="void" /> <argument index="0" name="shaped" type="RID" /> <argument index="1" name="width" type="float" /> - <argument index="2" name="trim_flags" type="int" /> + <argument index="2" name="trim_flags" type="int" enum="TextServer.TextOverrunFlag" /> <description> Trims text if it exceeds the given width. </description> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 10ccad973f..ad52b2f2f1 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -591,7 +591,7 @@ Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis. </constant> <constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout"> - Same as [code]TILE_LAYOUT_STAKED[/code], but the first half-offset is negative instead of positive. + Same as [constant TILE_LAYOUT_STACKED], but the first half-offset is negative instead of positive. </constant> <constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout"> Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right. diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml index 330a405d5f..08309a8ecc 100644 --- a/doc/classes/VehicleBody3D.xml +++ b/doc/classes/VehicleBody3D.xml @@ -16,7 +16,7 @@ Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidDynamicBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. </member> <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0"> - Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have [member VehicleWheel3D.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the vehicle reversing. </member> diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml index 1c164d7c9a..ac126f824e 100644 --- a/doc/classes/VehicleWheel3D.xml +++ b/doc/classes/VehicleWheel3D.xml @@ -48,7 +48,7 @@ The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5. </member> <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0"> - Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The [member RigidDynamicBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the wheel reversing. </member> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index c33e9aa020..53603b5356 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -286,6 +286,12 @@ <member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false"> If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset. </member> + <member name="vrs_mode" type="int" setter="set_vrs_mode" getter="get_vrs_mode" enum="Viewport.VRSMode" default="0"> + The Variable Rate Shading (VRS) mode that is used for this viewport. Note, if hardware does not support VRS this property is ignored. + </member> + <member name="vrs_texture" type="Texture2D" setter="set_vrs_texture" getter="get_vrs_texture"> + Texture to use when [member vrs_mode] is set to [constant Viewport.VRS_TEXTURE]. + </member> <member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d"> The custom [World2D] which can be used as 2D environment source. </member> @@ -492,5 +498,17 @@ </constant> <constant name="SDF_SCALE_MAX" value="3" enum="SDFScale"> </constant> + <constant name="VRS_DISABLED" value="0" enum="VRSMode"> + VRS is disabled. + </constant> + <constant name="VRS_TEXTURE" value="1" enum="VRSMode"> + VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. + </constant> + <constant name="VRS_XR" value="2" enum="VRSMode"> + VRS texture is supplied by the primary [XRInterface]. + </constant> + <constant name="VRS_MAX" value="3" enum="VRSMode"> + Represents the size of the [enum VRSMode] enum. + </constant> </constants> </class> diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml index 71f6a44724..1642ae61f7 100644 --- a/doc/classes/XRInterfaceExtension.xml +++ b/doc/classes/XRInterfaceExtension.xml @@ -106,6 +106,11 @@ Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic. </description> </method> + <method name="_get_vrs_texture" qualifiers="virtual"> + <return type="RID" /> + <description> + </description> + </method> <method name="_initialize" qualifiers="virtual"> <return type="bool" /> <description> |