diff options
99 files changed, 754 insertions, 239 deletions
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 4b864f0dd7..c29df07624 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -874,7 +874,8 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, bool p_unreliable, bool p if (method_id == UINT16_MAX && p_from->get_script_instance()) { method_id = p_from->get_script_instance()->get_rpc_method_id(p_name); } - ERR_FAIL_COND_MSG(method_id == UINT16_MAX, "Unable to take the `method_id` for the function:" + p_name + ". this can happen only if this method is not marked as `remote`."); + ERR_FAIL_COND_MSG(method_id == UINT16_MAX, + vformat("Unable to take the `method_id` for the function \"%s\" at path: \"%s\". This happens when the method is not marked as `remote`.", p_name, p_from->get_path())); if (method_id <= UINT8_MAX) { // The ID fits in 1 byte diff --git a/core/ustring.cpp b/core/ustring.cpp index 1d4d9c2dfd..da089dce40 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -1402,7 +1402,7 @@ String String::utf8(const char *p_utf8, int p_len) { bool String::parse_utf8(const char *p_utf8, int p_len) { -#define _UNICERROR(m_err) print_line("Unicode error: " + String(m_err)); +#define _UNICERROR(m_err) print_line("Unicode parsing error: " + String(m_err) + ". Is the string valid UTF-8?"); if (!p_utf8) return true; diff --git a/core/variant_call.cpp b/core/variant_call.cpp index f00aad33fc..db7244a221 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1526,8 +1526,11 @@ void Variant::get_method_list(List<MethodInfo> *p_list) const { PropertyInfo ret; #ifdef DEBUG_ENABLED ret.type = fd.return_type; - if (fd.returns) + if (fd.returns) { ret.name = "ret"; + if (fd.return_type == Variant::NIL) + ret.usage = PROPERTY_USAGE_NIL_IS_VARIANT; + } mi.return_val = ret; #endif diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index 03c23b6fdd..b5c1d38ff9 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -61,8 +61,10 @@ If [code]true[/code], the [member animation] is currently playing. </member> <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0"> + Strength of the specular light effect of this [AnimatedSprite]. </member> <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )"> + The color of the specular light effect. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The animation speed is multiplied by this value. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 0926ef9855..09811d5617 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -14,7 +14,7 @@ animation.track_insert_key(track_index, 0.0, 0) animation.track_insert_key(track_index, 0.5, 100) [/codeblock] - Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. + Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link> @@ -39,6 +39,7 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> + Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track. </description> </method> <method name="animation_track_insert_key"> @@ -51,6 +52,7 @@ <argument index="2" name="animation" type="StringName"> </argument> <description> + Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track. </description> </method> <method name="animation_track_set_key_animation"> @@ -63,6 +65,7 @@ <argument index="2" name="animation" type="StringName"> </argument> <description> + Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track. </description> </method> <method name="audio_track_get_key_end_offset" qualifiers="const"> @@ -73,6 +76,8 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> + Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + End offset is the number of seconds cut off at the ending of the audio stream. </description> </method> <method name="audio_track_get_key_start_offset" qualifiers="const"> @@ -83,6 +88,8 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> + Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + Start offset is the number of seconds cut off at the beginning of the audio stream. </description> </method> <method name="audio_track_get_key_stream" qualifiers="const"> @@ -93,6 +100,7 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> + Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="audio_track_insert_key"> @@ -109,6 +117,8 @@ <argument index="4" name="end_offset" type="float" default="0"> </argument> <description> + Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track. + [code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending. </description> </method> <method name="audio_track_set_key_end_offset"> @@ -121,6 +131,7 @@ <argument index="2" name="offset" type="float"> </argument> <description> + Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="audio_track_set_key_start_offset"> @@ -133,6 +144,7 @@ <argument index="2" name="offset" type="float"> </argument> <description> + Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="audio_track_set_key_stream"> @@ -145,6 +157,7 @@ <argument index="2" name="stream" type="Resource"> </argument> <description> + Sets the stream of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="bezier_track_get_key_in_handle" qualifiers="const"> @@ -155,6 +168,7 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> + Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_get_key_out_handle" qualifiers="const"> @@ -165,6 +179,7 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> + Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_get_key_value" qualifiers="const"> @@ -175,6 +190,7 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> + Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_insert_key"> @@ -191,6 +207,8 @@ <argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> + Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track. + [code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point. </description> </method> <method name="bezier_track_interpolate" qualifiers="const"> @@ -201,6 +219,7 @@ <argument index="1" name="time" type="float"> </argument> <description> + Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_in_handle"> @@ -213,6 +232,7 @@ <argument index="2" name="in_handle" type="Vector2"> </argument> <description> + Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_out_handle"> @@ -225,6 +245,7 @@ <argument index="2" name="out_handle" type="Vector2"> </argument> <description> + Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_value"> @@ -237,6 +258,7 @@ <argument index="2" name="value" type="float"> </argument> <description> + Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="clear"> @@ -675,6 +697,7 @@ <signals> <signal name="tracks_changed"> <description> + Emitted when there's a change in the list of tracks, e.g. tracks are added, moved or have changed paths. </description> </signal> </signals> @@ -689,10 +712,13 @@ Method tracks call functions with given arguments per key. </constant> <constant name="TYPE_BEZIER" value="3" enum="TrackType"> + Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]). </constant> <constant name="TYPE_AUDIO" value="4" enum="TrackType"> + Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation. </constant> <constant name="TYPE_ANIMATION" value="5" enum="TrackType"> + Animation tracks play animations in other [AnimationPlayer] nodes. </constant> <constant name="INTERPOLATION_NEAREST" value="0" enum="InterpolationType"> No interpolation (nearest value). @@ -713,6 +739,7 @@ Update at the keyframes. </constant> <constant name="UPDATE_CAPTURE" value="3" enum="UpdateMode"> + Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds. </constant> </constants> </class> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index 0befb79577..4a34d75ff9 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.0"> <brief_description> + [AnimationTree] node resource that contains many blend type nodes. </brief_description> <description> + This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> @@ -18,6 +20,7 @@ <argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> + Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later. </description> </method> <method name="connect_node"> @@ -30,6 +33,7 @@ <argument index="2" name="output_node" type="StringName"> </argument> <description> + Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code]. </description> </method> <method name="disconnect_node"> @@ -40,6 +44,7 @@ <argument index="1" name="input_index" type="int"> </argument> <description> + Disconnects the node connected to the specified input. </description> </method> <method name="get_node" qualifiers="const"> @@ -48,6 +53,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> + Returns the sub-node with the specified [code]name[/code]. </description> </method> <method name="get_node_position" qualifiers="const"> @@ -56,6 +62,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> + Returns the position of the sub-node with the specified [code]name[/code]. </description> </method> <method name="has_node" qualifiers="const"> @@ -64,6 +71,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> + Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists. </description> </method> <method name="remove_node"> @@ -72,6 +80,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> + Removes a sub-node. </description> </method> <method name="rename_node"> @@ -82,6 +91,7 @@ <argument index="1" name="new_name" type="StringName"> </argument> <description> + Changes the name of a sub-node. </description> </method> <method name="set_node_position"> @@ -92,25 +102,33 @@ <argument index="1" name="position" type="Vector2"> </argument> <description> + Modifies the position of a sub-node. </description> </method> </methods> <members> <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> + The global offset of all sub-nodes. </member> </members> <constants> <constant name="CONNECTION_OK" value="0"> + The connection was successful. </constant> <constant name="CONNECTION_ERROR_NO_INPUT" value="1"> + The input node is [code]null[/code]. </constant> <constant name="CONNECTION_ERROR_NO_INPUT_INDEX" value="2"> + The specified input port is out of range. </constant> <constant name="CONNECTION_ERROR_NO_OUTPUT" value="3"> + The output node is [code]null[/code]. </constant> <constant name="CONNECTION_ERROR_SAME_NODE" value="4"> + Input and output nodes are the same. </constant> <constant name="CONNECTION_ERROR_CONNECTION_EXISTS" value="5"> + The specified connection already exists. </constant> </constants> </class> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index b6e4ed9c98..4ba0b82df6 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0"> <brief_description> + Plays an animation once in [AnimationNodeBlendTree]. </brief_description> <description> + A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> @@ -25,10 +27,13 @@ </methods> <members> <member name="autorestart" type="bool" setter="set_autorestart" getter="has_autorestart" default="false"> + If [code]true[/code], the sub-animation will restart automatically after finishing. </member> <member name="autorestart_delay" type="float" setter="set_autorestart_delay" getter="get_autorestart_delay" default="1.0"> + The delay after which the automatic restart is triggered, in seconds. </member> <member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay" default="0.0"> + If [member autorestart] is [code]true[/code], a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay]. </member> <member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.1"> </member> diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml index f4bded2cd1..38b05eb650 100644 --- a/doc/classes/AnimationNodeOutput.xml +++ b/doc/classes/AnimationNodeOutput.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeOutput" inherits="AnimationNode" version="4.0"> <brief_description> + Generic output node to be added to [AnimationNodeBlendTree]. </brief_description> <description> </description> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index b647ff70b8..4ff39b7500 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -28,6 +28,17 @@ Adds a new node to the graph. The [code]position[/code] is used for display in the editor. </description> </method> + <method name="replace_node"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="node" type="AnimationNode"> + </argument> + <description> + Replaces the node and keeps its transitions unchanged. + </description> + </method> <method name="add_transition"> <return type="void"> </return> diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml index 229f9bbba2..5c2e6cb692 100644 --- a/doc/classes/AnimationNodeTimeScale.xml +++ b/doc/classes/AnimationNodeTimeScale.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.0"> <brief_description> + A time-scaling animation node to be used with [AnimationTree]. </brief_description> <description> + Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml index 5a9cbe4861..0fef106da5 100644 --- a/doc/classes/AnimationNodeTimeSeek.xml +++ b/doc/classes/AnimationNodeTimeSeek.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0"> <brief_description> + A time-seeking animation node to be used with [AnimationTree]. </brief_description> <description> + This node can be used to cause a seek command to happen to any sub-children of the graph. After setting the time, this value returns to -1. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index bf94fe0466..11250c5b17 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0"> <brief_description> + A generic animation transition node for [AnimationTree]. </brief_description> <description> + Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> @@ -47,8 +49,10 @@ </methods> <members> <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> <member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0"> + Cross-fading time (in seconds) between each animation connected to the inputs. </member> </members> <constants> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index 2a7db37eea..9642dd1c70 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationTree" inherits="Node" version="4.0"> <brief_description> + A node to be used for advanced animation transitions in an [AnimationPlayer]. </brief_description> <description> </description> @@ -15,6 +16,7 @@ <argument index="0" name="delta" type="float"> </argument> <description> + Manually advance the animations by the specified time (in seconds). </description> </method> <method name="get_root_motion_transform" qualifiers="const"> @@ -36,22 +38,29 @@ </methods> <members> <member name="active" type="bool" setter="set_active" getter="is_active" default="false"> + If [code]true[/code], the [AnimationTree] will be processing. </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. </member> <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1"> + The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes. </member> <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")"> </member> <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root"> + The root animation node of this [AnimationTree]. See [AnimationNode]. </member> </members> <constants> <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode"> + The animations will progress during the physics frame (i.e. [method Node._physics_process]). </constant> <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode"> + The animations will progress during the idle frame (i.e. [method Node._process]). </constant> <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode"> + The animations will only progress manually (see [method advance]). </constant> </constants> </class> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 33b62054df..47abd2e996 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -70,6 +70,7 @@ <return type="void"> </return> <description> + Removes all surfaces from this [ArrayMesh]. </description> </method> <method name="get_blend_shape_count" qualifiers="const"> diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index 189e3c7059..4dac81322f 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -1,22 +1,26 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectRecord" inherits="AudioEffect" version="4.0"> <brief_description> + Audio effect used for recording sound from a microphone. </brief_description> <description> </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link> </tutorials> <methods> <method name="get_recording" qualifiers="const"> <return type="AudioStreamSample"> </return> <description> + Returns the recorded sample. </description> </method> <method name="is_recording_active" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether the recording is active or not. </description> </method> <method name="set_recording_active"> @@ -25,11 +29,13 @@ <argument index="0" name="record" type="bool"> </argument> <description> + If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. </description> </method> </methods> <members> <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1"> + Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats. </member> </members> <constants> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 2e4ca9677d..380e739f46 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -67,6 +67,7 @@ <argument index="1" name="texture" type="Texture2D"> </argument> <description> + Sets the texture for the slot specified by [code]param[/code]. See [enum TextureParam] for available slots. </description> </method> </methods> @@ -425,8 +426,10 @@ Represents the size of the [enum TextureParam] enum. </constant> <constant name="TEXTURE_FILTER_NEAREST" value="0" enum="TextureFilter"> + The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. </constant> <constant name="TEXTURE_FILTER_LINEAR" value="1" enum="TextureFilter"> + The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. </constant> <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="2" enum="TextureFilter"> </constant> @@ -437,6 +440,7 @@ <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter"> </constant> <constant name="TEXTURE_FILTER_MAX" value="6" enum="TextureFilter"> + Represents the size of the [enum TextureFilter] enum. </constant> <constant name="DETAIL_UV_1" value="0" enum="DetailUV"> Use [code]UV[/code] with the detail texture. @@ -445,22 +449,29 @@ Use [code]UV2[/code] with the detail texture. </constant> <constant name="TRANSPARENCY_DISABLED" value="0" enum="Transparency"> + The material will not use transparency. </constant> <constant name="TRANSPARENCY_ALPHA" value="1" enum="Transparency"> + The material will use the texture's alpha values for transparency. </constant> <constant name="TRANSPARENCY_ALPHA_SCISSOR" value="2" enum="Transparency"> </constant> <constant name="TRANSPARENCY_ALPHA_DEPTH_PRE_PASS" value="3" enum="Transparency"> </constant> <constant name="TRANSPARENCY_MAX" value="4" enum="Transparency"> + Represents the size of the [enum Transparency] enum. </constant> <constant name="SHADING_MODE_UNSHADED" value="0" enum="ShadingMode"> + The object will not receive shadows. </constant> <constant name="SHADING_MODE_PER_PIXEL" value="1" enum="ShadingMode"> + The object will be shaded per pixel. Useful for realistic shading effect. </constant> <constant name="SHADING_MODE_PER_VERTEX" value="2" enum="ShadingMode"> + The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. </constant> <constant name="SHADING_MODE_MAX" value="3" enum="ShadingMode"> + Represents the size of the [enum ShadingMode] enum. </constant> <constant name="FEATURE_EMISSION" value="0" enum="Feature"> Constant for setting [member emission_enabled]. diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index ec38128c1e..3cc74beb58 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -1,8 +1,20 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Callable" version="4.0"> <brief_description> + An object representing a method in a certain object that can be called. </brief_description> <description> + [Callable] is a first class object which can be held in variables and passed to functions. It represents a given method in an [Object], and is typically used for signal callbacks. + [b]Example:[/b] + [codeblock] + var callable = Callable(self, "print_args") + func print_args(arg1, arg2, arg3 = ""): + prints(arg1, arg2, arg3) + func test(): + callable.call("hello", "world") # Prints "hello world". + callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(Node.gd)::print_args". + callable.call("invalid") # Invalid call, should have at least 2 arguments. + [/codeblock] </description> <tutorials> </tutorials> @@ -15,36 +27,42 @@ <argument index="1" name="method_name" type="StringName"> </argument> <description> + Creates a new [Callable] for the method called [code]method_name[/code] in the specified [code]object[/code]. </description> </method> <method name="call" qualifiers="vararg"> <return type="Variant"> </return> <description> + Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature. </description> </method> <method name="call_deferred" qualifiers="vararg"> <return type="void"> </return> <description> + Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature. </description> </method> <method name="get_method"> <return type="StringName"> </return> <description> + Returns the name of the method represented by this [Callable]. </description> </method> <method name="get_object"> <return type="Object"> </return> <description> + Returns the object on which this [Callable] is called. </description> </method> <method name="get_object_id"> <return type="int"> </return> <description> + Returns the ID of this [Callable]'s object (see [method Object.get_instance_id]). </description> </method> <method name="hash"> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index dec7c907a4..73ba8b392f 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -656,10 +656,13 @@ The [CanvasItem] has exited the canvas. </constant> <constant name="TEXTURE_FILTER_PARENT_NODE" value="0" enum="TextureFilter"> + The [CanvasItem] will inherit the filter from its parent. </constant> <constant name="TEXTURE_FILTER_NEAREST" value="1" enum="TextureFilter"> + The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art. </constant> <constant name="TEXTURE_FILTER_LINEAR" value="2" enum="TextureFilter"> + The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. </constant> <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter"> </constant> @@ -670,16 +673,22 @@ <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter"> </constant> <constant name="TEXTURE_FILTER_MAX" value="7" enum="TextureFilter"> + Represents the size of the [enum TextureFilter] enum. </constant> <constant name="TEXTURE_REPEAT_PARENT_NODE" value="0" enum="TextureRepeat"> + The [CanvasItem] will inherit the filter from its parent. </constant> <constant name="TEXTURE_REPEAT_DISABLED" value="1" enum="TextureRepeat"> + Texture will not repeat. </constant> <constant name="TEXTURE_REPEAT_ENABLED" value="2" enum="TextureRepeat"> + Texture will repeat normally. </constant> <constant name="TEXTURE_REPEAT_MIRROR" value="3" enum="TextureRepeat"> + Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored. </constant> <constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat"> + Represents the size of the [enum TextureRepeat] enum. </constant> </constants> </class> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index e3135a4d0f..242cdb8c80 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -21,6 +21,7 @@ If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> + The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. </member> <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference. diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 4903f0d3a5..e32ce9c9f9 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -19,7 +19,7 @@ Sets whether this collision shape should only detect collision on one side (top or bottom). </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> - The margin used for one-way collision (in pixels). + The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity. </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> The actual shape owned by this collision shape. diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 5ab929d911..d8b4a8f76c 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -88,26 +88,34 @@ </constants> <theme_items> <theme_item name="add_preset" type="Texture2D"> + The icon for the "Add Preset" button. </theme_item> <theme_item name="color_hue" type="Texture2D"> + Custom texture for the hue selection slider on the right. </theme_item> <theme_item name="color_sample" type="Texture2D"> </theme_item> <theme_item name="h_width" type="int" default="30"> + The width of the hue selection slider. </theme_item> <theme_item name="label_width" type="int" default="10"> </theme_item> <theme_item name="margin" type="int" default="4"> + The margin around the [ColorPicker]. </theme_item> <theme_item name="overbright_indicator" type="Texture2D"> + The indicator used to signalize that the color value is outside the 0-1 range. </theme_item> <theme_item name="preset_bg" type="Texture2D"> </theme_item> <theme_item name="screen_picker" type="Texture2D"> + The icon for the screen color picker button. </theme_item> <theme_item name="sv_height" type="int" default="256"> + The height of the saturation-value selection box. </theme_item> <theme_item name="sv_width" type="int" default="256"> + The width of the saturation-value selection box. </theme_item> </theme_items> </class> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index da3840384e..8fac3e950d 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorExportPlugin" inherits="Reference" version="4.0"> <brief_description> + A script that is executed when exporting projects. </brief_description> <description> </description> @@ -19,12 +20,14 @@ <argument index="3" name="flags" type="int"> </argument> <description> + Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. </description> </method> <method name="_export_end" qualifiers="virtual"> <return type="void"> </return> <description> + Virtual method to be overridden by the user. Called when the export is finished. </description> </method> <method name="_export_file" qualifiers="virtual"> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 2afdfde064..3e6bbd682d 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorFileDialog" inherits="ConfirmationDialog" version="4.0"> <brief_description> + A modified version of [FileDialog] used by the editor. </brief_description> <description> </description> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index a79c57e90f..30e1de1f5e 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -75,6 +75,7 @@ <return type="void"> </return> <description> + Scans the script files and updates the list of custom class names. </description> </method> </methods> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 3dad948629..f5c04b3947 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -191,6 +191,7 @@ <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> </member> <member name="sky" type="Sky" setter="set_sky" getter="get_sky"> + The [Sky] resource used for this [Environment]. </member> <member name="sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> </member> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index f2c65a8610..78fcec33ea 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -133,16 +133,22 @@ </constants> <theme_items> <theme_item name="files_disabled" type="Color" default="Color( 0, 0, 0, 0.7 )"> + The color tint for disabled files (when the [FileDialog] is used in open folder mode). </theme_item> <theme_item name="folder" type="Texture2D"> + Custom icon for folders. </theme_item> <theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + The color modulation applied to the folder icon. </theme_item> <theme_item name="parent_folder" type="Texture2D"> + Custom icon for the parent folder arrow. </theme_item> <theme_item name="reload" type="Texture2D"> + Custom icon for the reload button. </theme_item> <theme_item name="toggle_hidden" type="Texture2D"> + Custom icon for the toggle hidden button. </theme_item> </theme_items> </class> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 6543a3ecf1..882f819e37 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -85,6 +85,7 @@ <argument index="1" name="width" type="float"> </argument> <description> + Returns the size that the string would have with word wrapping enabled with a fixed [code]width[/code]. </description> </method> <method name="has_outline" qualifiers="const"> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 543afb01ee..c41ffd4bff 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -303,26 +303,37 @@ <theme_item name="bezier_len_pos" type="int" default="80"> </theme_item> <theme_item name="bg" type="StyleBox"> + The background drawn under the grid. </theme_item> <theme_item name="grid_major" type="Color" default="Color( 1, 1, 1, 0.2 )"> + Color of major grid lines. </theme_item> <theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )"> + Color of minor grid lines. </theme_item> <theme_item name="minus" type="Texture2D"> + The icon for the zoom out button. </theme_item> <theme_item name="more" type="Texture2D"> + The icon for the zoom in button. </theme_item> <theme_item name="port_grab_distance_horizontal" type="int" default="48"> + The horizontal range within which a port can be grabbed (on both sides). </theme_item> <theme_item name="port_grab_distance_vertical" type="int" default="6"> + The vertical range within which a port can be grabbed (on both sides). </theme_item> <theme_item name="reset" type="Texture2D"> + The icon for the zoom reset button. </theme_item> <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )"> + The fill color of the selection rectangle. </theme_item> <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )"> + The outline color of the selection rectangle. </theme_item> <theme_item name="snap" type="Texture2D"> + The icon for the snap toggle button. </theme_item> </theme_items> </class> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index a9f1b15443..33074536da 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -253,42 +253,59 @@ </constants> <theme_items> <theme_item name="breakpoint" type="StyleBox"> + The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT]. </theme_item> <theme_item name="close" type="Texture2D"> + The icon for the close button, visible when [member show_close] is enabled. </theme_item> <theme_item name="close_color" type="Color" default="Color( 0, 0, 0, 1 )"> + The color modulation applied to the close button icon. </theme_item> <theme_item name="close_offset" type="int" default="18"> + The vertical offset of the close button. </theme_item> <theme_item name="comment" type="StyleBox"> + The [StyleBox] used when [member comment] is enabled. </theme_item> <theme_item name="commentfocus" type="StyleBox"> + The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused. </theme_item> <theme_item name="defaultfocus" type="StyleBox"> </theme_item> <theme_item name="defaultframe" type="StyleBox"> </theme_item> <theme_item name="frame" type="StyleBox"> + The default background for [GraphNode]. </theme_item> <theme_item name="port" type="Texture2D"> + The icon used for representing ports. </theme_item> <theme_item name="port_offset" type="int" default="3"> + Horizontal offset for the ports. </theme_item> <theme_item name="position" type="StyleBox"> + The background used when [member overlay] is set to [constant OVERLAY_POSITION]. </theme_item> <theme_item name="resizer" type="Texture2D"> + The icon used for resizer, visible when [member resizable] is enabled. </theme_item> <theme_item name="resizer_color" type="Color" default="Color( 0, 0, 0, 1 )"> + The color modulation applied to the resizer icon. </theme_item> <theme_item name="selectedframe" type="StyleBox"> + The background used when the [GraphNode] is selected. </theme_item> <theme_item name="separation" type="int" default="1"> + The vertical distance between ports. </theme_item> <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )"> + Color of the title text. </theme_item> <theme_item name="title_font" type="Font"> + Font used for the title text. </theme_item> <theme_item name="title_offset" type="int" default="20"> + Vertical offset of the title text. </theme_item> </theme_items> </class> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index 4493ee8dc1..e13dc43104 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -20,8 +20,10 @@ </constants> <theme_items> <theme_item name="hseparation" type="int" default="4"> + The horizontal separation of children nodes. </theme_item> <theme_item name="vseparation" type="int" default="4"> + The vertical separation of children nodes. </theme_item> </theme_items> </class> diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml index aa83b67934..5b418d6428 100644 --- a/doc/classes/HSeparator.xml +++ b/doc/classes/HSeparator.xml @@ -14,8 +14,10 @@ </constants> <theme_items> <theme_item name="separation" type="int" default="4"> + The height of the area covered by the separator. Effectively works like a minimum height. </theme_item> <theme_item name="separator" type="StyleBox"> + The style for the separator line. Works best with [StyleBoxLine]. </theme_item> </theme_items> </class> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index be3c94e495..2738958058 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -14,16 +14,22 @@ </constants> <theme_items> <theme_item name="grabber" type="Texture2D"> + The texture for the grabber (the draggable element). </theme_item> <theme_item name="grabber_area" type="StyleBox"> + The background of the area to the left of the grabber. </theme_item> <theme_item name="grabber_disabled" type="Texture2D"> + The texture for the grabber when it's disabled. </theme_item> <theme_item name="grabber_highlight" type="Texture2D"> + The texture for the grabber when it's focused. </theme_item> <theme_item name="slider" type="StyleBox"> + The background for the whole slider. Determines the height of the [code]grabber_area[/code]. </theme_item> <theme_item name="tick" type="Texture2D"> + The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. </theme_item> </theme_items> </class> diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index 0dd1f96602..f6e9f33c20 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -14,12 +14,15 @@ </constants> <theme_items> <theme_item name="autohide" type="int" default="1"> + Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> <theme_item name="grabber" type="Texture2D"> + The icon used for the grabber drawn in the middle area. </theme_item> <theme_item name="separation" type="int" default="12"> + The space between sides of the container. </theme_item> </theme_items> </class> diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml index 53fa74cace..0d1b6ff0e0 100644 --- a/doc/classes/HingeJoint.xml +++ b/doc/classes/HingeJoint.xml @@ -15,6 +15,7 @@ <argument index="0" name="flag" type="int" enum="HingeJoint.Flag"> </argument> <description> + Returns the value of the specified flag. </description> </method> <method name="get_param" qualifiers="const"> @@ -23,6 +24,7 @@ <argument index="0" name="param" type="int" enum="HingeJoint.Param"> </argument> <description> + Returns the value of the specified parameter. </description> </method> <method name="set_flag"> @@ -33,6 +35,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], enables the specified flag. </description> </method> <method name="set_param"> @@ -43,6 +46,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the value of the specified parameter. </description> </method> </methods> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 98eb42831b..1578783b8b 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -42,6 +42,7 @@ <argument index="1" name="immediate" type="bool" default="false"> </argument> <description> + Replaces the texture's data with a new [code]image[/code]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call. </description> </method> </methods> diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml index 9cacd3e6fd..861ec026cd 100644 --- a/doc/classes/InputEventGesture.xml +++ b/doc/classes/InputEventGesture.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="InputEventGesture" inherits="InputEventWithModifiers" version="4.0"> <brief_description> + Base class for touch control gestures. </brief_description> <description> </description> @@ -10,6 +11,7 @@ </methods> <members> <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] that received this gesture. </member> </members> <constants> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 24b87f8e28..2a1d270990 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -125,8 +125,10 @@ Format of transform used to transform mesh, either 2D or 3D. </member> <member name="use_colors" type="bool" setter="set_use_colors" getter="is_using_colors" default="false"> + If [code]true[/code], the [MultiMesh] will use color data (see [member color_array]). </member> <member name="use_custom_data" type="bool" setter="set_use_custom_data" getter="is_using_custom_data" default="false"> + If [code]true[/code], the [MultiMesh] will use custom data (see [member custom_data_array]). </member> <member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count" default="-1"> Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers. diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml index 9e7ed59054..f0f59675de 100644 --- a/doc/classes/PackedDataContainerRef.xml +++ b/doc/classes/PackedDataContainerRef.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PackedDataContainerRef" inherits="Reference" version="4.0"> <brief_description> + Reference version of [PackedDataContainer]. </brief_description> <description> </description> diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index a96871ba28..a3f6a0be8f 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -14,6 +14,7 @@ </constants> <theme_items> <theme_item name="panel" type="StyleBox"> + The style of this [Panel]. </theme_item> </theme_items> </class> diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml index 9803a8dc51..d39122c395 100644 --- a/doc/classes/PanelContainer.xml +++ b/doc/classes/PanelContainer.xml @@ -17,6 +17,7 @@ </constants> <theme_items> <theme_item name="panel" type="StyleBox"> + The style of [PanelContainer]'s background. </theme_item> </theme_items> </class> diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml index de4cb9d98a..78cab4805e 100644 --- a/doc/classes/PinJoint.xml +++ b/doc/classes/PinJoint.xml @@ -15,6 +15,7 @@ <argument index="0" name="param" type="int" enum="PinJoint.Param"> </argument> <description> + Returns the value of the specified parameter. </description> </method> <method name="set_param"> @@ -25,6 +26,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the value of the specified parameter. </description> </method> </methods> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index f777545733..13332ca4f0 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -17,12 +17,14 @@ <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> + Adds a bone with the specified [code]path[/code] and [code]weights[/code]. </description> </method> <method name="clear_bones"> <return type="void"> </return> <description> + Removes all bones from this [Polygon2D]. </description> </method> <method name="erase_bone"> @@ -31,12 +33,14 @@ <argument index="0" name="index" type="int"> </argument> <description> + Removes the specified bone from this [Polygon2D]. </description> </method> <method name="get_bone_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of bones in this [Polygon2D]. </description> </method> <method name="get_bone_path" qualifiers="const"> @@ -45,6 +49,7 @@ <argument index="0" name="index" type="int"> </argument> <description> + Returns the path to the node associated with the specified bone. </description> </method> <method name="get_bone_weights" qualifiers="const"> @@ -53,6 +58,7 @@ <argument index="0" name="index" type="int"> </argument> <description> + Returns the height values of the specified bone. </description> </method> <method name="set_bone_path"> @@ -63,6 +69,7 @@ <argument index="1" name="path" type="NodePath"> </argument> <description> + Sets the path to the node associated with the specified bone. </description> </method> <method name="set_bone_weights"> @@ -73,6 +80,7 @@ <argument index="1" name="weights" type="PackedFloat32Array"> </argument> <description> + Sets the weight values for the specified bone. </description> </method> </methods> diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml index a3dd722f81..2e62d09f8f 100644 --- a/doc/classes/PopupPanel.xml +++ b/doc/classes/PopupPanel.xml @@ -14,6 +14,7 @@ </constants> <theme_items> <theme_item name="panel" type="StyleBox"> + The background panel style of this [PopupPanel]. </theme_item> </theme_items> </class> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index e94299a5b8..c957d6f182 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -21,14 +21,19 @@ </constants> <theme_items> <theme_item name="bg" type="StyleBox"> + The style of the background. </theme_item> <theme_item name="fg" type="StyleBox"> + The style of the progress (i.e. the part that fills the bar). </theme_item> <theme_item name="font" type="Font"> + Font used to draw the fill percentage if [member percent_visible] is [code]true[/code]. </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + The color of the text. </theme_item> <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )"> + The color of the text's shadow. </theme_item> </theme_items> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index af594c36d1..76674dcef8 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -824,16 +824,16 @@ </member> <member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0"> </member> - <member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="2048"> + <member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768"> Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> - <member name="network/limits/debugger/max_errors_per_second" type="int" setter="" getter="" default="100"> + <member name="network/limits/debugger/max_errors_per_second" type="int" setter="" getter="" default="400"> Maximum number of errors allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> - <member name="network/limits/debugger/max_queued_messages" type="int" setter="" getter="" default="10"> + <member name="network/limits/debugger/max_queued_messages" type="int" setter="" getter="" default="2048"> Maximum amount of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage. </member> - <member name="network/limits/debugger/max_warnings_per_second" type="int" setter="" getter="" default="100"> + <member name="network/limits/debugger/max_warnings_per_second" type="int" setter="" getter="" default="400"> Maximum number of warnings allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16"> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 533bc9ec28..1cf775f389 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -74,6 +74,8 @@ <argument index="0" name="path" type="String"> </argument> <description> + Returns the resource loaded by [method load_threaded_request]. + If this is called before the loading thread is done (i.e. [method load_threaded_get_status] is not [constant THREAD_LOAD_LOADED]), the calling thread will be blocked until the resource has finished loading. </description> </method> <method name="load_threaded_get_status"> @@ -84,6 +86,8 @@ <argument index="1" name="progress" type="Array" default="[ ]"> </argument> <description> + Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [code]path[/code]. See [enum ThreadLoadStatus] for possible return values. + An array variable can optionally be passed via [code]progress[/code], and will return a one-element array containing the percentage of completion of the threaded loading. </description> </method> <method name="load_threaded_request"> @@ -96,6 +100,7 @@ <argument index="2" name="use_sub_threads" type="bool" default="false"> </argument> <description> + Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). </description> </method> <method name="set_abort_on_missing_resources"> @@ -110,12 +115,16 @@ </methods> <constants> <constant name="THREAD_LOAD_INVALID_RESOURCE" value="0" enum="ThreadLoadStatus"> + The resource is invalid, or has not been loaded with [method load_threaded_request]. </constant> <constant name="THREAD_LOAD_IN_PROGRESS" value="1" enum="ThreadLoadStatus"> + The resource is still being loaded. </constant> <constant name="THREAD_LOAD_FAILED" value="2" enum="ThreadLoadStatus"> + Some error occurred during loading and it failed. </constant> <constant name="THREAD_LOAD_LOADED" value="3" enum="ThreadLoadStatus"> + The resource was loaded successfully and can be accessed via [method load_threaded_get]. </constant> </constants> </class> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 5f07133a27..efc0c9d600 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -409,38 +409,55 @@ </constants> <theme_items> <theme_item name="bold_font" type="Font"> + The font used for bold text. </theme_item> <theme_item name="bold_italics_font" type="Font"> + The font used for bold italics text. </theme_item> <theme_item name="default_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The default text color. </theme_item> <theme_item name="focus" type="StyleBox"> + The background The background used when the [RichTextLabel] is focused. </theme_item> <theme_item name="font_color_selected" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> + The color of selected text, used when [member selection_enabled] is [code]true[/code]. </theme_item> <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )"> + The color of the font's shadow. </theme_item> <theme_item name="italics_font" type="Font"> + The font used for italics text. </theme_item> <theme_item name="line_separation" type="int" default="1"> + The vertical space between lines. </theme_item> <theme_item name="mono_font" type="Font"> + The font used for monospace text. </theme_item> <theme_item name="normal" type="StyleBox"> + The normal background for the [RichTextLabel]. </theme_item> <theme_item name="normal_font" type="Font"> + The default text font. </theme_item> <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> + The color of the selection box. </theme_item> <theme_item name="shadow_as_outline" type="int" default="0"> + Boolean value. If 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline. </theme_item> <theme_item name="shadow_offset_x" type="int" default="1"> + The horizontal offset of the font's shadow. </theme_item> <theme_item name="shadow_offset_y" type="int" default="1"> + The vertical offset of the font's shadow. </theme_item> <theme_item name="table_hseparation" type="int" default="3"> + The horizontal separation of elements in a table. </theme_item> <theme_item name="table_vseparation" type="int" default="3"> + The vertical separation of elements in a table. </theme_item> </theme_items> </class> diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index f671315620..0d94453e52 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -38,30 +38,35 @@ <argument index="0" name="property" type="StringName"> </argument> <description> + Returns the default value of the specified property. </description> </method> <method name="get_script_constant_map"> <return type="Dictionary"> </return> <description> + Returns a dictionary containing constant names and their values. </description> </method> <method name="get_script_method_list"> <return type="Array"> </return> <description> + Returns the list of methods in this [Script]. </description> </method> <method name="get_script_property_list"> <return type="Array"> </return> <description> + Returns the list of properties in this [Script]. </description> </method> <method name="get_script_signal_list"> <return type="Array"> </return> <description> + Returns the list of user signals defined in this [Script]. </description> </method> <method name="has_script_signal" qualifiers="const"> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index ed401d6853..10d6e5f578 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ScriptEditor" inherits="PanelContainer" version="4.0"> <brief_description> + Godot editor's script editor. </brief_description> <description> </description> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index 350ab40c0e..51490caf6f 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Signal" version="4.0"> <brief_description> + Class representing a signal defined in an object. </brief_description> <description> </description> @@ -15,6 +16,7 @@ <argument index="1" name="signal_name" type="StringName"> </argument> <description> + Creates a new signal named [code]signal_name[/code] in the given object. </description> </method> <method name="connect"> @@ -27,6 +29,7 @@ <argument index="2" name="flags" type="int" default="0"> </argument> <description> + Connects this signal to the specified [Callable], optionally providing binds and connection flags. </description> </method> <method name="disconnect"> @@ -35,36 +38,42 @@ <argument index="0" name="callable" type="Callable"> </argument> <description> + Disconnects this signal from the specified [Callable]. </description> </method> <method name="emit" qualifiers="vararg"> <return type="void"> </return> <description> + Emits this signal to all connected objects. </description> </method> <method name="get_connections"> <return type="Array"> </return> <description> + Returns the list of [Callable]s connected to this signal. </description> </method> <method name="get_name"> <return type="StringName"> </return> <description> + Returns the name of this signal. </description> </method> <method name="get_object"> <return type="Object"> </return> <description> + Returns the object emitting this signal. </description> </method> <method name="get_object_id"> <return type="int"> </return> <description> + Returns the ID of the object emitting this signal (see [method Object.get_instance_id]). </description> </method> <method name="is_connected"> @@ -73,6 +82,7 @@ <argument index="0" name="callable" type="Callable"> </argument> <description> + Returns [code]true[/code] if the specified [Callable] is connected to this signal. </description> </method> <method name="is_null"> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index 89cdae1dff..6c21881535 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -68,10 +68,13 @@ The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> <member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0"> + Strength of the specular light effect of this [Sprite]. </member> <member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )"> + The color of the specular light effect. </member> <member name="specular_map" type="Texture2D" setter="set_specular_map" getter="get_specular_map"> + The specular map is used for more control on the shininess effect. </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> [Texture2D] object to draw. diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index aaea4178fb..563a17e8f6 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -21,12 +21,14 @@ <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags"> </argument> <description> + Returns the value of the specified flag. </description> </method> <method name="get_item_rect" qualifiers="const"> <return type="Rect2"> </return> <description> + Returns the rectangle representing this sprite. </description> </method> <method name="set_draw_flag"> @@ -37,6 +39,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], the specified flag will be enabled. </description> </method> </methods> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index 738d623d02..69e8f67a5e 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -72,11 +72,13 @@ A status representing a [StreamPeerSSL] that is disconnected. </constant> <constant name="STATUS_HANDSHAKING" value="1" enum="Status"> + A status representing a [StreamPeerSSL] during handshaking. </constant> <constant name="STATUS_CONNECTED" value="2" enum="Status"> A status representing a [StreamPeerSSL] that is connected to a host. </constant> <constant name="STATUS_ERROR" value="3" enum="Status"> + A status representing a [StreamPeerSSL] in error state. </constant> <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="4" enum="Status"> An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml index a2d26d3d14..03afcb5b0d 100644 --- a/doc/classes/StreamTexture.xml +++ b/doc/classes/StreamTexture.xml @@ -15,6 +15,7 @@ <argument index="0" name="path" type="String"> </argument> <description> + Loads the texture from the given path. </description> </method> </methods> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index f323a4bb6a..5d8ac6fdcc 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StringName" version="4.0"> <brief_description> + An optimized string type for unique names. </brief_description> <description> + [StringName]s are immutable strings designed for general-purpose represention of unique names. [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings. </description> <tutorials> </tutorials> @@ -13,6 +15,7 @@ <argument index="0" name="from" type="String"> </argument> <description> + Creates a new [StringName] from the given [String]. </description> </method> </methods> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 3c4fd4c41a..f7e94ad236 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -187,36 +187,52 @@ </constants> <theme_items> <theme_item name="decrement" type="Texture2D"> + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. </theme_item> <theme_item name="decrement_highlight" type="Texture2D"> + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> <theme_item name="font" type="Font"> + The font used to draw tab names. </theme_item> <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + Font color of inactive tabs. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + Font color of disabled tabs. </theme_item> <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Font color of the currently selected tab. </theme_item> <theme_item name="hseparation" type="int" default="4"> + Horizontal separation between tabs. </theme_item> <theme_item name="increment" type="Texture2D"> + Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. </theme_item> <theme_item name="increment_highlight" type="Texture2D"> + Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> <theme_item name="menu" type="Texture2D"> + The icon for the menu button (see [method set_popup]). </theme_item> <theme_item name="menu_highlight" type="Texture2D"> + The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor. </theme_item> <theme_item name="panel" type="StyleBox"> + The style for the background fill. </theme_item> <theme_item name="side_margin" type="int" default="8"> + The space at the left and right edges of the tab bar. </theme_item> <theme_item name="tab_bg" type="StyleBox"> + The style of inactive tabs. </theme_item> <theme_item name="tab_disabled" type="StyleBox"> + The style of disabled tabs. </theme_item> <theme_item name="tab_fg" type="StyleBox"> + The style of the currently selected tab. </theme_item> </theme_items> </class> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 8f31b24131..3fc1db9dc6 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -262,36 +262,51 @@ </constants> <theme_items> <theme_item name="button" type="StyleBox"> + Background of the close button when it's being hovered with the cursor. </theme_item> <theme_item name="button_pressed" type="StyleBox"> + Background of the close button when it's being pressed. </theme_item> <theme_item name="close" type="Texture2D"> + The icon for the close button (see [member tab_close_display_policy]). </theme_item> <theme_item name="decrement" type="Texture2D"> + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. </theme_item> <theme_item name="decrement_highlight" type="Texture2D"> + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> <theme_item name="font" type="Font"> + The font used to draw tab names. </theme_item> <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + Font color of inactive tabs. </theme_item> <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + Font color of disabled tabs. </theme_item> <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + Font color of the currently selected tab. </theme_item> <theme_item name="hseparation" type="int" default="4"> + The horizontal separation between the tabs. </theme_item> <theme_item name="increment" type="Texture2D"> + Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. </theme_item> <theme_item name="increment_highlight" type="Texture2D"> + Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> <theme_item name="tab_bg" type="StyleBox"> + The style of an inactive tab. </theme_item> <theme_item name="tab_disabled" type="StyleBox"> + The style of a disabled tab </theme_item> <theme_item name="tab_fg" type="StyleBox"> + The style of the currently selected tab. </theme_item> </theme_items> </class> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index d4eeb574eb..b515b27b31 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -502,6 +502,12 @@ <description> </description> </signal> + <signal name="symbol_validate"> + <argument index="0" name="symbol" type="String"> + </argument> + <description> + </description> + </signal> <signal name="text_changed"> <description> Emitted when the text changes. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 5fa24100ae..b01ba3850f 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -313,6 +313,7 @@ </signal> <signal name="item_custom_button_pressed"> <description> + Emitted when a custom button is pressed (i.e. in a [constant TreeItem.CELL_MODE_CUSTOM] mode cell). </description> </signal> <signal name="item_double_clicked"> diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml index 19e995b9bc..52f31b1da7 100644 --- a/doc/classes/VSeparator.xml +++ b/doc/classes/VSeparator.xml @@ -14,8 +14,10 @@ </constants> <theme_items> <theme_item name="separation" type="int" default="4"> + The width of the area covered by the separator. Effectively works like a minimum width. </theme_item> <theme_item name="separator" type="StyleBox"> + The style for the separator line. Works best with [StyleBoxLine] (remember to enable [member StyleBoxLine.vertical]). </theme_item> </theme_items> </class> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index cbc4ac1a13..3faafdfe80 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -18,16 +18,22 @@ </constants> <theme_items> <theme_item name="grabber" type="Texture2D"> + The texture for the grabber (the draggable element). </theme_item> <theme_item name="grabber_area" type="StyleBox"> + The background of the area below the grabber. </theme_item> <theme_item name="grabber_disabled" type="Texture2D"> + The texture for the grabber when it's disabled. </theme_item> <theme_item name="grabber_highlight" type="Texture2D"> + The texture for the grabber when it's focused. </theme_item> <theme_item name="slider" type="StyleBox"> + The background for the whole slider. Determines the width of the [code]grabber_area[/code]. </theme_item> <theme_item name="tick" type="Texture2D"> + The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. </theme_item> </theme_items> </class> diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 0e659408d7..18b515e7ce 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -14,12 +14,15 @@ </constants> <theme_items> <theme_item name="autohide" type="int" default="1"> + Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> <theme_item name="grabber" type="Texture2D"> + The icon used for the grabber drawn in the middle area. </theme_item> <theme_item name="separation" type="int" default="12"> + The space between sides of the container. </theme_item> </theme_items> </class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 0dd8ec0064..40b0f52469 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -22,6 +22,7 @@ <argument index="3" name="id" type="int"> </argument> <description> + Adds the specified node to the shader. </description> </method> <method name="can_connect_nodes" qualifiers="const"> @@ -38,6 +39,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Returns [code]true[/code] if the specified nodes and ports can be connected together. </description> </method> <method name="connect_nodes"> @@ -54,6 +56,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Connects the specified nodes and ports. </description> </method> <method name="connect_nodes_forced"> @@ -70,6 +73,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly. </description> </method> <method name="disconnect_nodes"> @@ -86,6 +90,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Connects the specified nodes and ports. </description> </method> <method name="get_node" qualifiers="const"> @@ -96,6 +101,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns the shader node instance with specified [code]type[/code] and [code]id[/code]. </description> </method> <method name="get_node_connections" qualifiers="const"> @@ -104,6 +110,7 @@ <argument index="0" name="type" type="int" enum="VisualShader.Type"> </argument> <description> + Returns the list of connected nodes with the specified type. </description> </method> <method name="get_node_list" qualifiers="const"> @@ -112,6 +119,7 @@ <argument index="0" name="type" type="int" enum="VisualShader.Type"> </argument> <description> + Returns the list of all nodes in the shader with the specified type. </description> </method> <method name="get_node_position" qualifiers="const"> @@ -122,6 +130,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Returns the position of the specified node within the shader graph. </description> </method> <method name="get_valid_node_id" qualifiers="const"> @@ -146,6 +155,7 @@ <argument index="4" name="to_port" type="int"> </argument> <description> + Returns [code]true[/code] if the specified node and port connection exist. </description> </method> <method name="remove_node"> @@ -156,6 +166,7 @@ <argument index="1" name="id" type="int"> </argument> <description> + Removes the specified node from the shader. </description> </method> <method name="set_mode"> @@ -164,6 +175,7 @@ <argument index="0" name="mode" type="int" enum="Shader.Mode"> </argument> <description> + Sets the mode of this shader. </description> </method> <method name="set_node_position"> @@ -176,22 +188,27 @@ <argument index="2" name="position" type="Vector2"> </argument> <description> + Sets the position of the specified node. </description> </method> </methods> <members> <member name="code" type="String" setter="set_code" getter="get_code" override="true" default=""shader_type spatial;void vertex() {// Output:0}void fragment() {// Output:0}void light() {// Output:0}"" /> <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> + The offset vector of the whole graph. </member> <member name="version" type="String" setter="set_version" getter="get_version" default=""""> </member> </members> <constants> <constant name="TYPE_VERTEX" value="0" enum="Type"> + A vertex shader, operating on vertices. </constant> <constant name="TYPE_FRAGMENT" value="1" enum="Type"> + A fragment shader, operating on fragments (pixels). </constant> <constant name="TYPE_LIGHT" value="2" enum="Type"> + A shader for light calculations. </constant> <constant name="TYPE_MAX" value="3" enum="Type"> Represents the size of the [enum Type] enum. diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 72ce743656..28d13a7d32 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNode" inherits="Resource" version="4.0"> <brief_description> + Base class for nodes in a visual shader graph. </brief_description> <description> </description> diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml index 16b8085df3..8b6bf00508 100644 --- a/doc/classes/WindowDialog.xml +++ b/doc/classes/WindowDialog.xml @@ -29,22 +29,31 @@ </constants> <theme_items> <theme_item name="close" type="Texture2D"> + The icon for the close button. </theme_item> <theme_item name="close_h_ofs" type="int" default="18"> + The horizontal offset of the close button. </theme_item> <theme_item name="close_highlight" type="Texture2D"> + The icon used for the close button when it's hovered with the mouse cursor. </theme_item> <theme_item name="close_v_ofs" type="int" default="18"> + The vertical offset of the close button. </theme_item> <theme_item name="panel" type="StyleBox"> + The style for both the content background of the [WindowDialog] and the title bar. </theme_item> <theme_item name="scaleborder_size" type="int" default="4"> + The thickness of the border that can be dragged when scaling the window (if [member resizable] is enabled). </theme_item> <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )"> + The color of the title text. </theme_item> <theme_item name="title_font" type="Font"> + The font used to draw the title. </theme_item> <theme_item name="title_height" type="int" default="20"> + The vertical offset of the title text. </theme_item> </theme_items> </class> diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp index 76dbadf67e..33877f86c2 100644 --- a/editor/editor_plugin_settings.cpp +++ b/editor/editor_plugin_settings.cpp @@ -137,19 +137,12 @@ void EditorPluginSettings::update_plugins() { item->set_metadata(1, script); item->set_text(2, author); item->set_metadata(2, description); - item->set_cell_mode(3, TreeItem::CELL_MODE_RANGE); - item->set_range_config(3, 0, 1, 1); - item->set_text(3, "Inactive,Active"); + item->set_cell_mode(3, TreeItem::CELL_MODE_CHECK); + item->set_text(3, TTR("Enable")); + bool is_active = EditorNode::get_singleton()->is_addon_plugin_enabled(d2); + item->set_checked(3, is_active); item->set_editable(3, true); item->add_button(4, get_icon("Edit", "EditorIcons"), BUTTON_PLUGIN_EDIT, false, TTR("Edit Plugin")); - - if (EditorNode::get_singleton()->is_addon_plugin_enabled(d2)) { - item->set_custom_color(3, get_color("success_color", "Editor")); - item->set_range(3, 1); - } else { - item->set_custom_color(3, get_color("disabled_font_color", "Editor")); - item->set_range(3, 0); - } } } } @@ -164,7 +157,7 @@ void EditorPluginSettings::_plugin_activity_changed() { TreeItem *ti = plugin_list->get_edited(); ERR_FAIL_COND(!ti); - bool active = ti->get_range(3); + bool active = ti->is_checked(3); String name = ti->get_metadata(0); EditorNode::get_singleton()->set_addon_plugin_enabled(name, active, true); @@ -173,14 +166,9 @@ void EditorPluginSettings::_plugin_activity_changed() { if (is_active != active) { updating = true; - ti->set_range(3, is_active ? 1 : 0); + ti->set_checked(3, is_active); updating = false; } - - if (is_active) - ti->set_custom_color(3, get_color("success_color", "Editor")); - else - ti->set_custom_color(3, get_color("disabled_font_color", "Editor")); } void EditorPluginSettings::_create_clicked() { diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 3c401a6fc7..98bc544478 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -109,9 +109,10 @@ void EditorResourcePreview::_thread_func(void *ud) { void EditorResourcePreview::_preview_ready(const String &p_str, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud) { - MutexLock lock(preview_mutex); String path = p_str; { + MutexLock lock(preview_mutex); + uint32_t hash = 0; uint64_t modified_time = 0; @@ -364,7 +365,6 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p cache[path_id].order = order++; p_receiver->call(p_receiver_func, path_id, cache[path_id].preview, cache[path_id].small_preview, p_userdata); - preview_mutex.unlock(); return; } @@ -391,7 +391,6 @@ void EditorResourcePreview::queue_resource_preview(const String &p_path, Object if (cache.has(p_path)) { cache[p_path].order = order++; p_receiver->call(p_receiver_func, p_path, cache[p_path].preview, cache[p_path].small_preview, p_userdata); - preview_mutex.unlock(); return; } @@ -436,9 +435,10 @@ void EditorResourcePreview::_bind_methods() { void EditorResourcePreview::check_for_invalidation(const String &p_path) { - MutexLock lock(preview_mutex); bool call_invalidated = false; { + MutexLock lock(preview_mutex); + if (cache.has(p_path)) { uint64_t modified_time = FileAccess::get_modified_time(p_path); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index a71cb50db4..652e9c7a7d 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -6243,6 +6243,10 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { settings_zfar->set_value(EDITOR_DEF("editors/3d/default_z_far", 1500)); settings_vbc->add_margin_child(TTR("View Z-Far:"), settings_zfar); + for (uint32_t i = 0; i < VIEWPORTS_COUNT; ++i) { + settings_dialog->connect("confirmed", callable_mp(viewports[i], &SpatialEditorViewport::_update_camera), varray(0.0)); + } + /* XFORM DIALOG */ xform_dialog = memnew(ConfirmationDialog); diff --git a/editor/translations/ca.po b/editor/translations/ca.po index 15d4265ef4..304fa8905b 100644 --- a/editor/translations/ca.po +++ b/editor/translations/ca.po @@ -11,12 +11,13 @@ # Adolfo Jayme Barrientos <fitojb@ubuntu.com>, 2020. # Xavier Gomez <hiulit@gmail.com>, 2020. # Aina <ainasoga@gmail.com>, 2020. +# Alex Mancha <codingstain@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-02-07 10:32+0000\n" -"Last-Translator: Roger Blanco Ribera <roger.blancoribera@gmail.com>\n" +"PO-Revision-Date: 2020-03-11 12:20+0000\n" +"Last-Translator: Alex Mancha <codingstain@gmail.com>\n" "Language-Team: Catalan <https://hosted.weblate.org/projects/godot-engine/" "godot/ca/>\n" "Language: ca\n" @@ -24,7 +25,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.11-dev\n" +"X-Generator: Weblate 4.0-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -694,9 +695,8 @@ msgid "Line Number:" msgstr "Línia:" #: editor/code_editor.cpp -#, fuzzy msgid "%d replaced." -msgstr "Substitueix..." +msgstr "%d reemplaçat." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -2756,7 +2756,6 @@ msgid "Set Up Version Control" msgstr "Configurar Control de Versions" #: editor/editor_node.cpp -#, fuzzy msgid "Shut Down Version Control" msgstr "Desactivar el control de versions" @@ -5974,7 +5973,7 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Couldn't create a single convex collision shape." -msgstr "" +msgstr "No s'ha pogut crear una capa de col·lisió convexa." #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy diff --git a/editor/translations/cs.po b/editor/translations/cs.po index f3ae992410..595db1837f 100644 --- a/editor/translations/cs.po +++ b/editor/translations/cs.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-01 05:50+0000\n" +"PO-Revision-Date: 2020-03-12 23:33+0000\n" "Last-Translator: Vojtěch Šamla <auzkok@seznam.cz>\n" "Language-Team: Czech <https://hosted.weblate.org/projects/godot-engine/godot/" "cs/>\n" @@ -1117,7 +1117,7 @@ msgstr "Děkujeme za komunitu Godotu!" #: editor/editor_about.cpp msgid "Godot Engine contributors" -msgstr "Přispívající do Godot Enginu" +msgstr "Přispěvatelé do Godot Enginu" #: editor/editor_about.cpp msgid "Project Founders" @@ -9907,7 +9907,6 @@ msgid "Can't run project" msgstr "Nelze spustit projekt" #: editor/project_manager.cpp -#, fuzzy msgid "" "You currently don't have any projects.\n" "Would you like to explore official example projects in the Asset Library?" diff --git a/editor/translations/de.po b/editor/translations/de.po index 14d9926ecb..1520c3aa2a 100644 --- a/editor/translations/de.po +++ b/editor/translations/de.po @@ -53,8 +53,8 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-08 22:32+0000\n" -"Last-Translator: PagDev <pag.develop@gmail.com>\n" +"PO-Revision-Date: 2020-03-14 15:05+0000\n" +"Last-Translator: So Wieso <sowieso@dukun.de>\n" "Language-Team: German <https://hosted.weblate.org/projects/godot-engine/" "godot/de/>\n" "Language: de\n" @@ -6029,9 +6029,8 @@ msgstr "" "Dies ist die präziseste (aber langsamste) Methode für Kollisionsberechnungen." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" -msgstr "Ein einzelnes konvexes Kollisionsunterelement erzeugen" +msgstr "Ein einzelnes konvexes Kollisionsnachbarelement erzeugen" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -12483,7 +12482,7 @@ msgstr "" #: scene/3d/collision_shape.cpp msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." -msgstr "" +msgstr "ConcavePolygonShape unterstützt RigidBody nur im Modus Statisch." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/es.po b/editor/translations/es.po index ed82e80658..3bbe96bcb3 100644 --- a/editor/translations/es.po +++ b/editor/translations/es.po @@ -47,7 +47,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-02-27 07:01+0000\n" +"PO-Revision-Date: 2020-03-11 12:20+0000\n" "Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/" "godot/es/>\n" @@ -6027,9 +6027,8 @@ msgstr "" "Es la opción más precisa (pero la más lenta) para la detección de colisiones." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" -msgstr "Crear una Única Colisión Convexa Hermana" +msgstr "Crear Colisión Convexa Única Hermana" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -12481,6 +12480,7 @@ msgstr "" msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." msgstr "" +"ConcavePolygonShape no soporta RigidBody de otro modo que no sea estático." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po index dce0d89b7e..7781d59f34 100644 --- a/editor/translations/es_AR.po +++ b/editor/translations/es_AR.po @@ -18,7 +18,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-02-27 07:01+0000\n" +"PO-Revision-Date: 2020-03-11 12:20+0000\n" "Last-Translator: Javier Ocampos <xavier.ocampos@gmail.com>\n" "Language-Team: Spanish (Argentina) <https://hosted.weblate.org/projects/" "godot-engine/godot/es_AR/>\n" @@ -5991,9 +5991,8 @@ msgstr "" "Esta es la opción mas exacta (pero más lenta) de detección de colisiones." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" -msgstr "Crear Colisión Convexa Unica como Nodo Hermano" +msgstr "Crear Colisión Convexa Única Hermana" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -12435,6 +12434,7 @@ msgstr "" msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." msgstr "" +"ConcavePolygonShape no soporta RigidBody de otro modo que no sea estático." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/fi.po b/editor/translations/fi.po index d590546571..2798d56d28 100644 --- a/editor/translations/fi.po +++ b/editor/translations/fi.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-02-21 23:33+0000\n" +"PO-Revision-Date: 2020-03-14 15:05+0000\n" "Last-Translator: Tapani Niemi <tapani.niemi@kapsi.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/" "godot/fi/>\n" @@ -23,7 +23,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.11.1\n" +"X-Generator: Weblate 4.0-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -5945,9 +5945,8 @@ msgstr "" "Tämä on tarkin (mutta hitain) vaihtoehto törmäystunnistukselle." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" -msgstr "Luo yksittäisen konveksin törmäysmuodon sisaret" +msgstr "Luo yksittäisen konveksin törmäyksen sisar" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -12362,6 +12361,7 @@ msgstr "" msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." msgstr "" +"ConcavePolygonShape ei tue RigidBody solmua muussa kuin staattisessa tilassa." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/ja.po b/editor/translations/ja.po index 3c14b17b53..0bb76f1261 100644 --- a/editor/translations/ja.po +++ b/editor/translations/ja.po @@ -35,7 +35,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-05 08:33+0000\n" +"PO-Revision-Date: 2020-03-16 09:43+0000\n" "Last-Translator: Akihiro Ogoshi <technical@palsystem-game.com>\n" "Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/" "godot/ja/>\n" @@ -908,7 +908,7 @@ msgstr "切断" #: editor/connections_dialog.cpp msgid "Connect a Signal to a Method" -msgstr "メソッドにシグナルを接続する" +msgstr "メソッドにシグナルを接続" #: editor/connections_dialog.cpp msgid "Edit Connection:" @@ -5834,7 +5834,7 @@ msgstr "グラデーション編集" #: editor/plugins/item_list_editor_plugin.cpp msgid "Item %d" -msgstr "アイテム%d" +msgstr "アイテム %d" #: editor/plugins/item_list_editor_plugin.cpp msgid "Items" @@ -5854,7 +5854,7 @@ msgstr "メッシュがありません!" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Couldn't create a Trimesh collision shape." -msgstr "トライメッシュコリジョンシェイプを作成できませんでした。" +msgstr "三角形メッシュ コリジョンシェイプを作成できませんでした。" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Static Trimesh Body" @@ -5954,7 +5954,7 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Trimesh Collision Sibling" -msgstr "三角形メッシュ兄弟コリジョンを生成" +msgstr "三角形メッシュ コリジョンの兄弟を作成" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -5965,7 +5965,6 @@ msgstr "" "これは、衝突検出の最も正確な(ただし最も遅い)オプションです。" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" msgstr "単一の凸型コリジョンの兄弟を作成" @@ -5979,7 +5978,7 @@ msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Multiple Convex Collision Siblings" -msgstr "複数の凸型コリジョンの兄弟を作成する" +msgstr "複数の凸型コリジョンの兄弟を作成" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "" @@ -7654,7 +7653,7 @@ msgstr "ジオメトリが無効です。衝突ポリゴンを作成できませ #: editor/plugins/sprite_editor_plugin.cpp msgid "Create CollisionPolygon2D Sibling" -msgstr "CollisionPolygon2Dの兄弟を作成する" +msgstr "CollisionPolygon2Dの兄弟を作成" #: editor/plugins/sprite_editor_plugin.cpp msgid "Invalid geometry, can't create light occluder." @@ -7662,7 +7661,7 @@ msgstr "ジオメトリが無効です。ライトオクールダーを作成で #: editor/plugins/sprite_editor_plugin.cpp msgid "Create LightOccluder2D Sibling" -msgstr "LightOccluder2Dの兄弟を作成する" +msgstr "LightOccluder2Dの兄弟を作成" #: editor/plugins/sprite_editor_plugin.cpp msgid "Sprite" @@ -11936,9 +11935,9 @@ msgid "" " Godot Version: %s\n" "Please reinstall Android build template from 'Project' menu." msgstr "" -"Androidビルドバージョンの不一致:\n" -"インストールされたテンプレート:%s\n" -"ゴドーバージョン:%s\n" +"Androidビルド バージョンの不一致:\n" +" インストールされたテンプレート: %s\n" +" Godot バージョン: %s\n" "「プロジェクト 」メニューからAndroidビルドテンプレートを再インストールしてく" "ださい。" @@ -11952,7 +11951,7 @@ msgid "" "Alternatively visit docs.godotengine.org for Android build documentation." msgstr "" "Androidプロジェクトのビルドに失敗しました。エラーの出力を確認してください。\n" -"あるいは、Androidビルドドキュメントについてはdocs.godotengine.orgをご覧くださ" +"また、Androidビルドについてのドキュメントは docs.godotengine.org をご覧くださ" "い。" #: platform/android/export/export.cpp @@ -12372,6 +12371,8 @@ msgstr "" msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." msgstr "" +"ConcavePolygonShape は、Static 以外のモードの RigidBody をサポートしていませ" +"ん。" #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/ko.po b/editor/translations/ko.po index 37c950097b..ec33599440 100644 --- a/editor/translations/ko.po +++ b/editor/translations/ko.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-05 08:33+0000\n" +"PO-Revision-Date: 2020-03-14 00:33+0000\n" "Last-Translator: Ch. <ccwpc@hanmail.net>\n" "Language-Team: Korean <https://hosted.weblate.org/projects/godot-engine/" "godot/ko/>\n" @@ -12271,6 +12271,8 @@ msgstr "" msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." msgstr "" +"ConcavePolygonShape는 static 외의 모드가 설정된 RigidBody를 지원하지 않습니" +"다." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/lv.po b/editor/translations/lv.po index dc0a5aa151..14dfdff801 100644 --- a/editor/translations/lv.po +++ b/editor/translations/lv.po @@ -4,12 +4,13 @@ # This file is distributed under the same license as the Godot source code. # Gustavs Porietis (pg829-) <porietisgustavs@gmail.com>, 2018. # Martch Zagorski <martchzagorski@gmail.com>, 2018. +# Jānis Ondzuls <janisond@inbox.lv>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2018-12-13 14:41+0100\n" -"Last-Translator: Martch Zagorski <martchzagorski@gmail.com>\n" +"PO-Revision-Date: 2020-03-11 12:20+0000\n" +"Last-Translator: Jānis Ondzuls <janisond@inbox.lv>\n" "Language-Team: Latvian <https://hosted.weblate.org/projects/godot-engine/" "godot/lv/>\n" "Language: lv\n" @@ -18,7 +19,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n % 10 == 0 || n % 100 >= 11 && n % 100 <= " "19) ? 0 : ((n % 10 == 1 && n % 100 != 11) ? 1 : 2);\n" -"X-Generator: Poedit 2.2\n" +"X-Generator: Weblate 4.0-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -65,31 +66,31 @@ msgstr "" #: core/ustring.cpp msgid "B" -msgstr "" +msgstr "B" #: core/ustring.cpp msgid "KiB" -msgstr "" +msgstr "KiB" #: core/ustring.cpp msgid "MiB" -msgstr "" +msgstr "MiB" #: core/ustring.cpp msgid "GiB" -msgstr "" +msgstr "GiB" #: core/ustring.cpp msgid "TiB" -msgstr "" +msgstr "TiB" #: core/ustring.cpp msgid "PiB" -msgstr "" +msgstr "PiB" #: core/ustring.cpp msgid "EiB" -msgstr "" +msgstr "EiB" #: editor/animation_bezier_editor.cpp msgid "Free" @@ -101,29 +102,27 @@ msgstr "Balancēts" #: editor/animation_bezier_editor.cpp msgid "Mirror" -msgstr "" +msgstr "Spogulis" #: editor/animation_bezier_editor.cpp editor/editor_profiler.cpp msgid "Time:" -msgstr "" +msgstr "Laiks:" #: editor/animation_bezier_editor.cpp msgid "Value:" -msgstr "" +msgstr "Vērtība:" #: editor/animation_bezier_editor.cpp msgid "Insert Key Here" -msgstr "" +msgstr "Ievadiet vērtību šeit" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Duplicate Selected Key(s)" -msgstr "Dublikāta Izvēle" +msgstr "Dublikāta Vērtības" #: editor/animation_bezier_editor.cpp -#, fuzzy msgid "Delete Selected Key(s)" -msgstr "Izdzēst izvēlētos failus?" +msgstr "Izdzēst izvēlēto(ās) vērtību(as)?" #: editor/animation_bezier_editor.cpp msgid "Add Bezier Point" @@ -682,7 +681,7 @@ msgstr "" #: editor/array_property_edit.cpp msgid "Change Array Value" -msgstr "" +msgstr "Izmainīt masīva vērtību" #: editor/code_editor.cpp msgid "Go to Line" @@ -690,20 +689,19 @@ msgstr "Doties uz Rindu" #: editor/code_editor.cpp msgid "Line Number:" -msgstr "" +msgstr "Rindas Numurs:" #: editor/code_editor.cpp -#, fuzzy msgid "%d replaced." -msgstr "Aizvietot" +msgstr "%d aizvietots." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." -msgstr "" +msgstr "%d sakritība." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d matches." -msgstr "" +msgstr "%d sakritības." #: editor/code_editor.cpp editor/find_in_files.cpp msgid "Match Case" @@ -719,16 +717,16 @@ msgstr "Aizvietot" #: editor/code_editor.cpp msgid "Replace All" -msgstr "" +msgstr "Aizvietot visu" #: editor/code_editor.cpp msgid "Selection Only" -msgstr "" +msgstr "Tikai izvēlētais" #: editor/code_editor.cpp editor/plugins/script_text_editor.cpp #: editor/plugins/text_editor.cpp msgid "Standard" -msgstr "" +msgstr "Standarts" #: editor/code_editor.cpp editor/plugins/script_editor_plugin.cpp msgid "Toggle Scripts Panel" diff --git a/editor/translations/nl.po b/editor/translations/nl.po index 458ff0b5b8..a729ea6119 100644 --- a/editor/translations/nl.po +++ b/editor/translations/nl.po @@ -44,7 +44,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-08 22:33+0000\n" +"PO-Revision-Date: 2020-03-16 09:43+0000\n" "Last-Translator: Stijn Hinlopen <f.a.hinlopen@gmail.com>\n" "Language-Team: Dutch <https://hosted.weblate.org/projects/godot-engine/godot/" "nl/>\n" @@ -12434,7 +12434,7 @@ msgstr "" #: scene/3d/collision_shape.cpp msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." -msgstr "" +msgstr "ConcavePolygonShape ondersteunt RigidBody alleen in statische modus." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/pl.po b/editor/translations/pl.po index 14bbb799aa..de1d6d5375 100644 --- a/editor/translations/pl.po +++ b/editor/translations/pl.po @@ -42,7 +42,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-08 22:33+0000\n" +"PO-Revision-Date: 2020-03-16 09:43+0000\n" "Last-Translator: Tomek <kobewi4e@gmail.com>\n" "Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/" "godot/pl/>\n" @@ -5981,7 +5981,6 @@ msgstr "" "To jest najdokładniejsza (ale najwolniejsza) opcja do detekcji kolizji." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" msgstr "Utwórz pojedynczego wypukłego sąsiada kolizji" @@ -12400,6 +12399,8 @@ msgstr "" msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." msgstr "" +"ConcavePolygonShape nie obsługuje węzła RigidBody w innym trybie niż " +"statyczny." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po index 60009b3171..d7532e38d4 100644 --- a/editor/translations/pt_PT.po +++ b/editor/translations/pt_PT.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-02-18 15:09+0000\n" +"PO-Revision-Date: 2020-03-16 09:43+0000\n" "Last-Translator: João Lopes <linux-man@hotmail.com>\n" "Language-Team: Portuguese (Portugal) <https://hosted.weblate.org/projects/" "godot-engine/godot/pt_PT/>\n" @@ -28,7 +28,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.11\n" +"X-Generator: Weblate 4.0-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -5958,7 +5958,6 @@ msgstr "" "Esta é a mais precisa (mas mais lenta) opção para deteção de colisão." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Collision Sibling" msgstr "Criar Irmãos Únicos de Colisão Convexa" @@ -12362,7 +12361,7 @@ msgstr "" #: scene/3d/collision_shape.cpp msgid "" "ConcavePolygonShape doesn't support RigidBody in another mode than static." -msgstr "" +msgstr "ConcavePolygonShape apenas suporta RigidBody no modo estático." #: scene/3d/cpu_particles.cpp msgid "Nothing is visible because no mesh has been assigned." diff --git a/editor/translations/ru.po b/editor/translations/ru.po index b05077637a..d3402fd63e 100644 --- a/editor/translations/ru.po +++ b/editor/translations/ru.po @@ -66,12 +66,13 @@ # Artur Tretiak <stikyt@protonmail.com>, 2020. # Smadjavul <o1985af@gmail.com>, 2020. # anonymous <noreply@weblate.org>, 2020. +# Vinsent Insaider_red <vinsent.in7aider@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-03-07 21:18+0000\n" -"Last-Translator: Smadjavul <o1985af@gmail.com>\n" +"PO-Revision-Date: 2020-03-11 12:20+0000\n" +"Last-Translator: Vinsent Insaider_red <vinsent.in7aider@gmail.com>\n" "Language-Team: Russian <https://hosted.weblate.org/projects/godot-engine/" "godot/ru/>\n" "Language: ru\n" @@ -98,9 +99,8 @@ msgid "Not enough bytes for decoding bytes, or invalid format." msgstr "Недостаточно байтов для декодирования байтов или неверный формат." #: core/math/expression.cpp -#, fuzzy msgid "Invalid input %i (not passed) in expression" -msgstr "Некорректный ввод %i (не был передан) в выражении" +msgstr "Некорректный ввод %i (не подходит) в выражении" #: core/math/expression.cpp msgid "self can't be used because instance is null (not passed)" diff --git a/editor/translations/tr.po b/editor/translations/tr.po index c73724c7b7..83eb878d8c 100644 --- a/editor/translations/tr.po +++ b/editor/translations/tr.po @@ -42,12 +42,13 @@ # Muhammet Mustafa Tozlu <m.mustafatozlu@gmail.com>, 2019. # HALİL ATAŞ <halillatass@gmail.com>, 2019. # Zsosu Ktosu <zktosu@gmail.com>, 2020. +# Mesut Aslan <kontinyu@gmail.com>, 2020. msgid "" msgstr "" "Project-Id-Version: Godot Engine editor\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2020-01-30 03:56+0000\n" -"Last-Translator: Zsosu Ktosu <zktosu@gmail.com>\n" +"PO-Revision-Date: 2020-03-11 12:20+0000\n" +"Last-Translator: Mesut Aslan <kontinyu@gmail.com>\n" "Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/" "godot/tr/>\n" "Language: tr\n" @@ -55,7 +56,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.11-dev\n" +"X-Generator: Weblate 4.0-dev\n" #: core/math/expression.cpp modules/gdscript/gdscript_functions.cpp #: modules/visual_script/visual_script_builtin_funcs.cpp @@ -726,9 +727,8 @@ msgid "Line Number:" msgstr "Satır Numarası:" #: editor/code_editor.cpp -#, fuzzy msgid "%d replaced." -msgstr "Değiştir..." +msgstr "%d değiştirildi." #: editor/code_editor.cpp editor/editor_help.cpp msgid "%d match." @@ -3989,9 +3989,8 @@ msgid "Saving..." msgstr "Kaydediliyor..." #: editor/import_dock.cpp -#, fuzzy msgid "%d Files" -msgstr " Dosyalar" +msgstr "%d Dosya" #: editor/import_dock.cpp msgid "Set as Default for '%s'" @@ -5870,9 +5869,8 @@ msgid "Mesh is empty!" msgstr "Örüntü boş!" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Couldn't create a Trimesh collision shape." -msgstr "Üçlü Örüntü Çarpışma Kardeşi Oluştur" +msgstr "Trimesh çarpışma şekli oluşturulamadı." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Create Static Trimesh Body" @@ -5888,25 +5886,23 @@ msgstr "Üçlü Örüntü Yüzeyi Oluştur" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Can't create a single convex collision shape for the scene root." -msgstr "" +msgstr "Sahne kökü için tek bir dışbükey çarpışma şekli oluşturulamaz." #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Couldn't create a single convex collision shape." -msgstr "" +msgstr "Tek dışbükey çarpışma şekli oluşturulamadı." #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Create Single Convex Shape" -msgstr "Dışbükey Şekil[ler] Oluştur" +msgstr "Tekil Dışbükey Şekil Oluştur" #: editor/plugins/mesh_instance_editor_plugin.cpp msgid "Can't create multiple convex collision shapes for the scene root." msgstr "" #: editor/plugins/mesh_instance_editor_plugin.cpp -#, fuzzy msgid "Couldn't create any collision shapes." -msgstr "Klasör oluşturulamadı." +msgstr "Herhangi bir çarpışma şekli oluşturulamadı." #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy @@ -5977,6 +5973,8 @@ msgid "" "Creates a polygon-based collision shape.\n" "This is the most accurate (but slowest) option for collision detection." msgstr "" +"Poligon bazlı bir çarpışma şekli oluştur.\n" +"Bu en hassas (fakat en yavaş) çarpışma algılama seçeneğidir." #: editor/plugins/mesh_instance_editor_plugin.cpp #, fuzzy diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index d31823d632..2882567b0a 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -597,52 +597,7 @@ Error GDScript::reload(bool p_keep_state) { _set_subclass_path(E->get(), path); } - // Copy the base rpc methods so we don't mask their IDs. - rpc_functions.clear(); - rpc_variables.clear(); - if (base.is_valid()) { - rpc_functions = base->rpc_functions; - rpc_variables = base->rpc_variables; - } - - GDScript *cscript = this; - Map<StringName, Ref<GDScript> >::Element *sub_E = subclasses.front(); - while (cscript) { - // RPC Methods - for (Map<StringName, GDScriptFunction *>::Element *E = cscript->member_functions.front(); E; E = E->next()) { - if (E->get()->get_rpc_mode() != MultiplayerAPI::RPC_MODE_DISABLED) { - ScriptNetData nd; - nd.name = E->key(); - nd.mode = E->get()->get_rpc_mode(); - if (-1 == rpc_functions.find(nd)) { - rpc_functions.push_back(nd); - } - } - } - // RSet - for (Map<StringName, MemberInfo>::Element *E = cscript->member_indices.front(); E; E = E->next()) { - if (E->get().rpc_mode != MultiplayerAPI::RPC_MODE_DISABLED) { - ScriptNetData nd; - nd.name = E->key(); - nd.mode = E->get().rpc_mode; - if (-1 == rpc_variables.find(nd)) { - rpc_variables.push_back(nd); - } - } - } - - if (cscript != this) - sub_E = sub_E->next(); - - if (sub_E) - cscript = sub_E->get().ptr(); - else - cscript = NULL; - } - - // Sort so we are 100% that they are always the same. - rpc_functions.sort_custom<SortNetData>(); - rpc_variables.sort_custom<SortNetData>(); + _init_rpc_methods_properties(); return OK; } @@ -715,8 +670,8 @@ StringName GDScript::get_rset_property(const uint16_t p_rset_member_id) const { } MultiplayerAPI::RPCMode GDScript::get_rset_mode_by_id(const uint16_t p_rset_member_id) const { - ERR_FAIL_COND_V(p_rset_member_id >= rpc_functions.size(), MultiplayerAPI::RPC_MODE_DISABLED); - return rpc_functions[p_rset_member_id].mode; + ERR_FAIL_COND_V(p_rset_member_id >= rpc_variables.size(), MultiplayerAPI::RPC_MODE_DISABLED); + return rpc_variables[p_rset_member_id].mode; } MultiplayerAPI::RPCMode GDScript::get_rset_mode(const StringName &p_variable) const { @@ -881,6 +836,8 @@ Error GDScript::load_byte_code(const String &p_path) { _set_subclass_path(E->get(), path); } + _init_rpc_methods_properties(); + return OK; } @@ -1030,6 +987,55 @@ void GDScript::_save_orphaned_subclasses() { } } +void GDScript::_init_rpc_methods_properties() { + // Copy the base rpc methods so we don't mask their IDs. + rpc_functions.clear(); + rpc_variables.clear(); + if (base.is_valid()) { + rpc_functions = base->rpc_functions; + rpc_variables = base->rpc_variables; + } + + GDScript *cscript = this; + Map<StringName, Ref<GDScript> >::Element *sub_E = subclasses.front(); + while (cscript) { + // RPC Methods + for (Map<StringName, GDScriptFunction *>::Element *E = cscript->member_functions.front(); E; E = E->next()) { + if (E->get()->get_rpc_mode() != MultiplayerAPI::RPC_MODE_DISABLED) { + ScriptNetData nd; + nd.name = E->key(); + nd.mode = E->get()->get_rpc_mode(); + if (-1 == rpc_functions.find(nd)) { + rpc_functions.push_back(nd); + } + } + } + // RSet + for (Map<StringName, MemberInfo>::Element *E = cscript->member_indices.front(); E; E = E->next()) { + if (E->get().rpc_mode != MultiplayerAPI::RPC_MODE_DISABLED) { + ScriptNetData nd; + nd.name = E->key(); + nd.mode = E->get().rpc_mode; + if (-1 == rpc_variables.find(nd)) { + rpc_variables.push_back(nd); + } + } + } + + if (cscript != this) + sub_E = sub_E->next(); + + if (sub_E) + cscript = sub_E->get().ptr(); + else + cscript = NULL; + } + + // Sort so we are 100% that they are always the same. + rpc_functions.sort_custom<SortNetData>(); + rpc_variables.sort_custom<SortNetData>(); +} + GDScript::~GDScript() { for (Map<StringName, GDScriptFunction *>::Element *E = member_functions.front(); E; E = E->next()) { memdelete(E->get()); diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index 456cd88fe6..2b8158fe55 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -136,6 +136,7 @@ class GDScript : public Script { bool _update_exports(); void _save_orphaned_subclasses(); + void _init_rpc_methods_properties(); protected: bool _get(const StringName &p_name, Variant &r_ret) const; diff --git a/modules/mbedtls/packet_peer_mbed_dtls.h b/modules/mbedtls/packet_peer_mbed_dtls.h index 26c4543785..b958fa3b95 100755 --- a/modules/mbedtls/packet_peer_mbed_dtls.h +++ b/modules/mbedtls/packet_peer_mbed_dtls.h @@ -67,7 +67,7 @@ protected: public: virtual void poll(); virtual Error accept_peer(Ref<PacketPeerUDP> p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert = Ref<X509Certificate>(), Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>(), Ref<CookieContextMbedTLS> p_cookies = Ref<CookieContextMbedTLS>()); - virtual Error connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs = false, const String &p_for_hostname = String(), Ref<X509Certificate> p_ca_certs = Ref<X509Certificate>()); + virtual Error connect_to_peer(Ref<PacketPeerUDP> p_base, bool p_validate_certs = true, const String &p_for_hostname = String(), Ref<X509Certificate> p_ca_certs = Ref<X509Certificate>()); virtual Status get_status() const; virtual void disconnect_from_peer(); diff --git a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs index 76cb249acf..9afd9adeb1 100644 --- a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs +++ b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/DotNetSolution.cs @@ -1,6 +1,8 @@ using GodotTools.Core; using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Text.RegularExpressions; namespace GodotTools.ProjectEditor { @@ -118,5 +120,40 @@ EndProject"; const string ProjectPlatformsConfig = @" {{{0}}}.{1}|Any CPU.ActiveCfg = {1}|Any CPU {{{0}}}.{1}|Any CPU.Build.0 = {1}|Any CPU"; + + public static void MigrateFromOldConfigNames(string slnPath) + { + if (!File.Exists(slnPath)) + return; + + var input = File.ReadAllText(slnPath); + + if (!Regex.IsMatch(input, Regex.Escape("Tools|Any CPU"))) + return; + + // This method renames old configurations in solutions to the new ones. + // + // This is the order configs appear in the solution and what we want to rename them to: + // Debug|Any CPU = Debug|Any CPU -> ExportDebug|Any CPU = ExportDebug|Any CPU + // Tools|Any CPU = Tools|Any CPU -> Debug|Any CPU = Debug|Any CPU + // + // But we want to move Tools (now Debug) to the top, so it's easier to rename like this: + // Debug|Any CPU = Debug|Any CPU -> Debug|Any CPU = Debug|Any CPU + // Release|Any CPU = Release|Any CPU -> ExportDebug|Any CPU = ExportDebug|Any CPU + // Tools|Any CPU = Tools|Any CPU -> ExportRelease|Any CPU = ExportRelease|Any CPU + + var dict = new Dictionary<string, string> + { + {"Debug|Any CPU", "Debug|Any CPU"}, + {"Release|Any CPU", "ExportDebug|Any CPU"}, + {"Tools|Any CPU", "ExportRelease|Any CPU"} + }; + + var regex = new Regex(string.Join("|",dict.Keys.Select(Regex.Escape))); + var result = regex.Replace(input,m => dict[m.Value]); + + if (result != input) + File.WriteAllText(slnPath, result); + } } } diff --git a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectGenerator.cs b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectGenerator.cs index 28b7832f90..cbe3afaedd 100644 --- a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectGenerator.cs +++ b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectGenerator.cs @@ -17,30 +17,30 @@ namespace GodotTools.ProjectEditor string path = Path.Combine(dir, name + ".csproj"); ProjectPropertyGroupElement mainGroup; - var root = CreateLibraryProject(name, "Tools", out mainGroup); + var root = CreateLibraryProject(name, "Debug", out mainGroup); mainGroup.SetProperty("OutputPath", Path.Combine(".mono", "temp", "bin", "$(Configuration)")); mainGroup.SetProperty("BaseIntermediateOutputPath", Path.Combine(".mono", "temp", "obj")); mainGroup.SetProperty("IntermediateOutputPath", Path.Combine("$(BaseIntermediateOutputPath)", "$(Configuration)")); - mainGroup.SetProperty("ApiConfiguration", "Debug").Condition = " '$(Configuration)' != 'Release' "; - mainGroup.SetProperty("ApiConfiguration", "Release").Condition = " '$(Configuration)' == 'Release' "; - - var toolsGroup = root.AddPropertyGroup(); - toolsGroup.Condition = " '$(Configuration)|$(Platform)' == 'Tools|AnyCPU' "; - toolsGroup.AddProperty("DebugSymbols", "true"); - toolsGroup.AddProperty("DebugType", "portable"); - toolsGroup.AddProperty("Optimize", "false"); - toolsGroup.AddProperty("DefineConstants", "$(GodotDefineConstants);GODOT;DEBUG;TOOLS;"); - toolsGroup.AddProperty("ErrorReport", "prompt"); - toolsGroup.AddProperty("WarningLevel", "4"); - toolsGroup.AddProperty("ConsolePause", "false"); + mainGroup.SetProperty("ApiConfiguration", "Debug").Condition = " '$(Configuration)' != 'ExportRelease' "; + mainGroup.SetProperty("ApiConfiguration", "Release").Condition = " '$(Configuration)' == 'ExportRelease' "; + + var debugGroup = root.AddPropertyGroup(); + debugGroup.Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "; + debugGroup.AddProperty("DebugSymbols", "true"); + debugGroup.AddProperty("DebugType", "portable"); + debugGroup.AddProperty("Optimize", "false"); + debugGroup.AddProperty("DefineConstants", "$(GodotDefineConstants);GODOT;DEBUG;TOOLS;"); + debugGroup.AddProperty("ErrorReport", "prompt"); + debugGroup.AddProperty("WarningLevel", "4"); + debugGroup.AddProperty("ConsolePause", "false"); var coreApiRef = root.AddItem("Reference", CoreApiProjectName); coreApiRef.AddMetadata("HintPath", Path.Combine("$(ProjectDir)", ".mono", "assemblies", "$(ApiConfiguration)", CoreApiProjectName + ".dll")); coreApiRef.AddMetadata("Private", "False"); var editorApiRef = root.AddItem("Reference", EditorApiProjectName); - editorApiRef.Condition = " '$(Configuration)' == 'Tools' "; + editorApiRef.Condition = " '$(Configuration)' == 'Debug' "; editorApiRef.AddMetadata("HintPath", Path.Combine("$(ProjectDir)", ".mono", "assemblies", "$(ApiConfiguration)", EditorApiProjectName + ".dll")); editorApiRef.AddMetadata("Private", "False"); @@ -103,24 +103,24 @@ namespace GodotTools.ProjectEditor mainGroup.AddProperty("TargetFrameworkVersion", "v4.7"); mainGroup.AddProperty("GodotProjectGeneratorVersion", Assembly.GetExecutingAssembly().GetName().Version.ToString()); - var debugGroup = root.AddPropertyGroup(); - debugGroup.Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "; - debugGroup.AddProperty("DebugSymbols", "true"); - debugGroup.AddProperty("DebugType", "portable"); - debugGroup.AddProperty("Optimize", "false"); - debugGroup.AddProperty("DefineConstants", "$(GodotDefineConstants);GODOT;DEBUG;"); - debugGroup.AddProperty("ErrorReport", "prompt"); - debugGroup.AddProperty("WarningLevel", "4"); - debugGroup.AddProperty("ConsolePause", "false"); - - var releaseGroup = root.AddPropertyGroup(); - releaseGroup.Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "; - releaseGroup.AddProperty("DebugType", "portable"); - releaseGroup.AddProperty("Optimize", "true"); - releaseGroup.AddProperty("DefineConstants", "$(GodotDefineConstants);GODOT;"); - releaseGroup.AddProperty("ErrorReport", "prompt"); - releaseGroup.AddProperty("WarningLevel", "4"); - releaseGroup.AddProperty("ConsolePause", "false"); + var exportDebugGroup = root.AddPropertyGroup(); + exportDebugGroup.Condition = " '$(Configuration)|$(Platform)' == 'ExportDebug|AnyCPU' "; + exportDebugGroup.AddProperty("DebugSymbols", "true"); + exportDebugGroup.AddProperty("DebugType", "portable"); + exportDebugGroup.AddProperty("Optimize", "false"); + exportDebugGroup.AddProperty("DefineConstants", "$(GodotDefineConstants);GODOT;DEBUG;"); + exportDebugGroup.AddProperty("ErrorReport", "prompt"); + exportDebugGroup.AddProperty("WarningLevel", "4"); + exportDebugGroup.AddProperty("ConsolePause", "false"); + + var exportReleaseGroup = root.AddPropertyGroup(); + exportReleaseGroup.Condition = " '$(Configuration)|$(Platform)' == 'ExportRelease|AnyCPU' "; + exportReleaseGroup.AddProperty("DebugType", "portable"); + exportReleaseGroup.AddProperty("Optimize", "true"); + exportReleaseGroup.AddProperty("DefineConstants", "$(GodotDefineConstants);GODOT;"); + exportReleaseGroup.AddProperty("ErrorReport", "prompt"); + exportReleaseGroup.AddProperty("WarningLevel", "4"); + exportReleaseGroup.AddProperty("ConsolePause", "false"); // References var referenceGroup = root.AddItemGroup(); diff --git a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectUtils.cs b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectUtils.cs index 233aab45b3..af36f125f5 100644 --- a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectUtils.cs +++ b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectUtils.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Reflection; using DotNet.Globbing; using Microsoft.Build.Construction; @@ -44,6 +45,7 @@ namespace GodotTools.ProjectEditor globOptions.Evaluation.CaseInsensitive = false; var root = ProjectRootElement.Open(projectPath); + Debug.Assert(root != null); foreach (var itemGroup in root.ItemGroups) { @@ -85,35 +87,35 @@ namespace GodotTools.ProjectEditor void AddPropertyIfNotPresent(string name, string condition, string value) { if (root.PropertyGroups - .Any(g => (g.Condition == string.Empty || g.Condition == condition) && + .Any(g => (g.Condition == string.Empty || g.Condition.Trim() == condition) && g.Properties .Any(p => p.Name == name && p.Value == value && - (p.Condition == condition || g.Condition == condition)))) + (p.Condition.Trim() == condition || g.Condition.Trim() == condition)))) { return; } - root.AddProperty(name, value).Condition = condition; + root.AddProperty(name, value).Condition = " " + condition + " "; dirty = true; } AddPropertyIfNotPresent(name: "ApiConfiguration", - condition: " '$(Configuration)' != 'Release' ", + condition: "'$(Configuration)' != 'ExportRelease'", value: "Debug"); AddPropertyIfNotPresent(name: "ApiConfiguration", - condition: " '$(Configuration)' == 'Release' ", + condition: "'$(Configuration)' == 'ExportRelease'", value: "Release"); void SetReferenceHintPath(string referenceName, string condition, string hintPath) { foreach (var itemGroup in root.ItemGroups.Where(g => - g.Condition == string.Empty || g.Condition == condition)) + g.Condition.Trim() == string.Empty || g.Condition.Trim() == condition)) { var references = itemGroup.Items.Where(item => item.ItemType == "Reference" && item.Include == referenceName && - (item.Condition == condition || itemGroup.Condition == condition)); + (item.Condition.Trim() == condition || itemGroup.Condition.Trim() == condition)); var referencesWithHintPath = references.Where(reference => reference.Metadata.Any(m => m.Name == "HintPath")); @@ -152,7 +154,7 @@ namespace GodotTools.ProjectEditor } // Found no Reference item at all. Add it. - root.AddItem("Reference", referenceName).Condition = condition; + root.AddItem("Reference", referenceName).Condition = " " + condition + " "; dirty = true; } @@ -160,7 +162,7 @@ namespace GodotTools.ProjectEditor const string editorProjectName = "GodotSharpEditor"; const string coreCondition = ""; - const string editorCondition = " '$(Configuration)' == 'Tools' "; + const string editorCondition = "'$(Configuration)' == 'Debug'"; var coreHintPath = $"$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/{coreProjectName}.dll"; var editorHintPath = $"$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/{editorProjectName}.dll"; @@ -171,5 +173,104 @@ namespace GodotTools.ProjectEditor if (dirty) root.Save(); } + + public static void MigrateFromOldConfigNames(string projectPath) + { + var root = ProjectRootElement.Open(projectPath); + Debug.Assert(root != null); + + bool dirty = false; + + bool hasGodotProjectGeneratorVersion = false; + bool foundOldConfiguration = false; + + foreach (var propertyGroup in root.PropertyGroups.Where(g => g.Condition == string.Empty)) + { + if (!hasGodotProjectGeneratorVersion && propertyGroup.Properties.Any(p => p.Name == "GodotProjectGeneratorVersion")) + hasGodotProjectGeneratorVersion = true; + + foreach (var configItem in propertyGroup.Properties + .Where(p => p.Condition.Trim() == "'$(Configuration)' == ''" && p.Value == "Tools")) + { + configItem.Value = "Debug"; + foundOldConfiguration = true; + dirty = true; + } + } + + if (!hasGodotProjectGeneratorVersion) + { + root.PropertyGroups.First(g => g.Condition == string.Empty)? + .AddProperty("GodotProjectGeneratorVersion", Assembly.GetExecutingAssembly().GetName().Version.ToString()); + dirty = true; + } + + if (!foundOldConfiguration) + { + var toolsConditions = new[] + { + "'$(Configuration)|$(Platform)' == 'Tools|AnyCPU'", + "'$(Configuration)|$(Platform)' != 'Tools|AnyCPU'", + "'$(Configuration)' == 'Tools'", + "'$(Configuration)' != 'Tools'" + }; + + foundOldConfiguration = root.PropertyGroups + .Any(g => toolsConditions.Any(c => c == g.Condition.Trim())); + } + + if (foundOldConfiguration) + { + void MigrateConfigurationConditions(string oldConfiguration, string newConfiguration) + { + void MigrateConditions(string oldCondition, string newCondition) + { + foreach (var propertyGroup in root.PropertyGroups.Where(g => g.Condition.Trim() == oldCondition)) + { + propertyGroup.Condition = " " + newCondition + " "; + dirty = true; + } + + foreach (var propertyGroup in root.PropertyGroups) + { + foreach (var prop in propertyGroup.Properties.Where(p => p.Condition.Trim() == oldCondition)) + { + prop.Condition = " " + newCondition + " "; + dirty = true; + } + } + + foreach (var itemGroup in root.ItemGroups.Where(g => g.Condition.Trim() == oldCondition)) + { + itemGroup.Condition = " " + newCondition + " "; + dirty = true; + } + + foreach (var itemGroup in root.ItemGroups) + { + foreach (var item in itemGroup.Items.Where(item => item.Condition.Trim() == oldCondition)) + { + item.Condition = " " + newCondition + " "; + dirty = true; + } + } + } + + foreach (var op in new[] {"==", "!="}) + { + MigrateConditions($"'$(Configuration)|$(Platform)' {op} '{oldConfiguration}|AnyCPU'", $"'$(Configuration)|$(Platform)' {op} '{newConfiguration}|AnyCPU'"); + MigrateConditions($"'$(Configuration)' {op} '{oldConfiguration}'", $"'$(Configuration)' {op} '{newConfiguration}'"); + } + } + + MigrateConfigurationConditions("Debug", "ExportDebug"); + MigrateConfigurationConditions("Release", "ExportRelease"); + MigrateConfigurationConditions("Tools", "Debug"); // Must be last + } + + + if (dirty) + root.Save(); + } } } diff --git a/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs b/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs index bd7eb59913..2971236482 100644 --- a/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs +++ b/modules/mono/editor/GodotTools/GodotTools/BottomPanel.cs @@ -166,7 +166,7 @@ namespace GodotTools Internal.GodotIs32Bits() ? "32" : "64" }; - bool buildSuccess = BuildManager.BuildProjectBlocking("Tools", godotDefines); + bool buildSuccess = BuildManager.BuildProjectBlocking("Debug", godotDefines); if (!buildSuccess) return; diff --git a/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs b/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs index 69a8c9cf4a..94214cbb8f 100644 --- a/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs +++ b/modules/mono/editor/GodotTools/GodotTools/BuildManager.cs @@ -166,7 +166,7 @@ namespace GodotTools // Make sure the API assemblies are up to date before building the project. // We may not have had the chance to update the release API assemblies, and the debug ones // may have been deleted by the user at some point after they were loaded by the Godot editor. - string apiAssembliesUpdateError = Internal.UpdateApiAssembliesFromPrebuilt(config == "Release" ? "Release" : "Debug"); + string apiAssembliesUpdateError = Internal.UpdateApiAssembliesFromPrebuilt(config == "ExportRelease" ? "Release" : "Debug"); if (!string.IsNullOrEmpty(apiAssembliesUpdateError)) { @@ -242,7 +242,7 @@ namespace GodotTools Internal.GodotIs32Bits() ? "32" : "64" }; - return BuildProjectBlocking("Tools", godotDefines); + return BuildProjectBlocking("Debug", godotDefines); } public static void Initialize() @@ -256,7 +256,7 @@ namespace GodotTools : BuildTool.MsBuildVs; EditorDef("mono/builds/build_tool", msbuild); - + editorSettings.AddPropertyInfo(new Godot.Collections.Dictionary { ["type"] = Godot.Variant.Type.Int, diff --git a/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs b/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs index 9abfda4538..421729cc11 100644 --- a/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs +++ b/modules/mono/editor/GodotTools/GodotTools/CsProjOperations.cs @@ -32,18 +32,6 @@ namespace GodotTools ProjectUtils.AddItemToProjectChecked(projectPath, itemType, include); } - public static void FixApiHintPath(string projectPath) - { - try - { - ProjectUtils.FixApiHintPath(projectPath); - } - catch (Exception e) - { - GD.PushError(e.ToString()); - } - } - private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); private static ulong ConvertToTimestamp(this DateTime value) diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs index 3e2a8c22a9..05f84f547b 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs @@ -150,7 +150,7 @@ namespace GodotTools.Export string outputDir = new FileInfo(path).Directory?.FullName ?? throw new FileNotFoundException("Base directory not found"); - string buildConfig = isDebug ? "Debug" : "Release"; + string buildConfig = isDebug ? "ExportDebug" : "ExportRelease"; string scriptsMetadataPath = Path.Combine(GodotSharpDirs.ResMetadataDir, $"scripts_metadata.{(isDebug ? "debug" : "release")}"); CsProjOperations.GenerateScriptsMetadata(GodotSharpDirs.ProjectCsProjPath, scriptsMetadataPath); diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs index 147bc95bb8..796522b2f2 100644 --- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs +++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs @@ -61,7 +61,7 @@ namespace GodotTools { Guid = guid, PathRelativeToSolution = name + ".csproj", - Configs = new List<string> { "Debug", "Release", "Tools" } + Configs = new List<string> { "Debug", "ExportDebug", "ExportRelease" } }; solution.AddNewProject(name, projectInfo); @@ -401,8 +401,22 @@ namespace GodotTools if (File.Exists(GodotSharpDirs.ProjectSlnPath) && File.Exists(GodotSharpDirs.ProjectCsProjPath)) { - // Make sure the existing project has Api assembly references configured correctly - CsProjOperations.FixApiHintPath(GodotSharpDirs.ProjectCsProjPath); + try + { + // Migrate solution from old configuration names to: Debug, ExportDebug and ExportRelease + DotNetSolution.MigrateFromOldConfigNames(GodotSharpDirs.ProjectSlnPath); + // Migrate csproj from old configuration names to: Debug, ExportDebug and ExportRelease + ProjectUtils.MigrateFromOldConfigNames(GodotSharpDirs.ProjectCsProjPath); + + // Apply the other fixes after configurations are migrated + + // Make sure the existing project has Api assembly references configured correctly + ProjectUtils.FixApiHintPath(GodotSharpDirs.ProjectCsProjPath); + } + catch (Exception e) + { + GD.PushError(e.ToString()); + } } else { diff --git a/modules/mono/glue/GodotSharp/GodotSharp.sln b/modules/mono/glue/GodotSharp/GodotSharp.sln index a496e36da3..4896d0a07d 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp.sln +++ b/modules/mono/glue/GodotSharp/GodotSharp.sln @@ -8,8 +8,6 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AEBF0036-DA76-4341-B651-A3F2856AB2FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 050fdbcb07..1f3ba2f20b 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -1148,8 +1148,8 @@ StringName VisualScript::get_rset_property(const uint16_t p_rset_property_id) co } MultiplayerAPI::RPCMode VisualScript::get_rset_mode_by_id(const uint16_t p_rset_variable_id) const { - ERR_FAIL_COND_V(p_rset_variable_id >= rpc_functions.size(), MultiplayerAPI::RPC_MODE_DISABLED); - return rpc_functions[p_rset_variable_id].mode; + ERR_FAIL_COND_V(p_rset_variable_id >= rpc_variables.size(), MultiplayerAPI::RPC_MODE_DISABLED); + return rpc_variables[p_rset_variable_id].mode; } MultiplayerAPI::RPCMode VisualScript::get_rset_mode(const StringName &p_variable) const { diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index fbd9a2aa7d..ce1e75a61d 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -565,6 +565,27 @@ void AnimationNodeStateMachine::add_node(const StringName &p_name, Ref<Animation p_node->connect("tree_changed", callable_mp(this, &AnimationNodeStateMachine::_tree_changed), varray(), CONNECT_REFERENCE_COUNTED); } +void AnimationNodeStateMachine::replace_node(const StringName &p_name, Ref<AnimationNode> p_node) { + + ERR_FAIL_COND(states.has(p_name) == false); + ERR_FAIL_COND(p_node.is_null()); + ERR_FAIL_COND(String(p_name).find("/") != -1); + + { + Ref<AnimationNode> node = states[p_name].node; + if (node.is_valid()) { + node->disconnect_compat("tree_changed", this, "_tree_changed"); + } + } + + states[p_name].node = p_node; + + emit_changed(); + emit_signal("tree_changed"); + + p_node->connect_compat("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED); +} + Ref<AnimationNode> AnimationNodeStateMachine::get_node(const StringName &p_name) const { ERR_FAIL_COND_V(!states.has(p_name), Ref<AnimationNode>()); @@ -949,6 +970,7 @@ void AnimationNodeStateMachine::_tree_changed() { void AnimationNodeStateMachine::_bind_methods() { ClassDB::bind_method(D_METHOD("add_node", "name", "node", "position"), &AnimationNodeStateMachine::add_node, DEFVAL(Vector2())); + ClassDB::bind_method(D_METHOD("replace_node", "name", "node"), &AnimationNodeStateMachine::replace_node); ClassDB::bind_method(D_METHOD("get_node", "name"), &AnimationNodeStateMachine::get_node); ClassDB::bind_method(D_METHOD("remove_node", "name"), &AnimationNodeStateMachine::remove_node); ClassDB::bind_method(D_METHOD("rename_node", "name", "new_name"), &AnimationNodeStateMachine::rename_node); diff --git a/scene/animation/animation_node_state_machine.h b/scene/animation/animation_node_state_machine.h index 55c9c3f00e..27a4451f08 100644 --- a/scene/animation/animation_node_state_machine.h +++ b/scene/animation/animation_node_state_machine.h @@ -178,6 +178,7 @@ public: virtual Variant get_parameter_default_value(const StringName &p_parameter) const; void add_node(const StringName &p_name, Ref<AnimationNode> p_node, const Vector2 &p_position = Vector2()); + void replace_node(const StringName &p_name, Ref<AnimationNode> p_node); Ref<AnimationNode> get_node(const StringName &p_name) const; void remove_node(const StringName &p_name); void rename_node(const StringName &p_name, const StringName &p_new_name); diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index ed25729c40..a68b750b31 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -258,7 +258,7 @@ void AudioStreamPlaybackSample::mix(AudioFrame *p_buffer, float p_rate_scale, in float srate = base->mix_rate; srate *= p_rate_scale; float fincrement = srate / base_rate; - int32_t increment = int32_t(fincrement * MIX_FRAC_LEN); + int32_t increment = int32_t(MAX(fincrement * MIX_FRAC_LEN, 1)); increment *= sign; //looping diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 8cd0dc7937..e32e7c093a 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -2198,6 +2198,14 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p valid = true; break; } + if (b->parent_function) { + for (int i = 0; i < b->parent_function->arguments.size(); i++) { + if (b->parent_function->arguments[i].name == var_name) { + valid = true; + break; + } + } + } b = b->parent_block; } |