diff options
Diffstat (limited to 'doc/classes')
44 files changed, 215 insertions, 141 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 3e46dc4e92..493f55e89b 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -55,7 +55,7 @@ <argument index="0" name="s" type="float"> </argument> <description> - Returns the absolute value of parameter [code]s[/code] (i.e. unsigned value, works for integer and float). + Returns the absolute value of parameter [code]s[/code] (i.e. unsigned value, works for integer and float). [codeblock] # a is 1 a = abs(-1) @@ -120,9 +120,9 @@ <method name="atan2"> <return type="float"> </return> - <argument index="0" name="x" type="float"> + <argument index="0" name="y" type="float"> </argument> - <argument index="1" name="y" type="float"> + <argument index="1" name="x" type="float"> </argument> <description> Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant. @@ -373,7 +373,7 @@ <description> Returns the floating-point remainder of [code]x/y[/code] that wraps equally in positive and negative. [codeblock] - var i = -10; + var i = -10 while i < 0: prints(i, fposmod(i, 10)) i += 1 diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 5a53e7cb05..65d339c0d5 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -886,8 +886,10 @@ Middle Mouse Button </constant> <constant name="BUTTON_XBUTTON1" value="8" enum="ButtonList"> + Extra Mouse Button 1 </constant> <constant name="BUTTON_XBUTTON2" value="9" enum="ButtonList"> + Extra Mouse Button 2 </constant> <constant name="BUTTON_WHEEL_UP" value="4" enum="ButtonList"> Mouse wheel up @@ -911,8 +913,10 @@ Middle Mouse Button Mask </constant> <constant name="BUTTON_MASK_XBUTTON1" value="128" enum="ButtonList"> + Extra Mouse Button 1 Mask </constant> <constant name="BUTTON_MASK_XBUTTON2" value="256" enum="ButtonList"> + Extra Mouse Button 2 Mask </constant> <constant name="JOY_BUTTON_0" value="0" enum="JoystickList"> Joypad Button 0 diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index 9c306c3ea4..d3d6fce537 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -6,7 +6,7 @@ <description> This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy pass throughs to the state of buttons and such on the controllers. Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used you should react to the signals and add ARVRController nodes to your scene. - The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller. + The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller. </description> <tutorials> </tutorials> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 3bd621799a..b013b3c4ae 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -120,7 +120,7 @@ <argument index="3" name="before" type="bool" default="True"> </argument> <description> - Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior. + Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If false, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return true if the first argument is less than the second, and return false otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior. </description> </method> <method name="clear"> @@ -321,7 +321,7 @@ static func sort(a, b): if a[0] < b[0]: return true - return false + return false var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] my_items.sort_custom(MyCustomSorter, "sort") diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 453f28fe5a..ed3d2d2205 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -3,6 +3,23 @@ <brief_description> </brief_description> <description> + The [code]ArrayMesh[/code] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle + [codeblock] + var vertices = PoolVector3Array() + vertices.push_back(Vector3(0,1,0)) + vertices.push_back(Vector3(1,0,0)) + vertices.push_back(Vector3(0,0,1)) + # Initialize the ArrayMesh. + var arr_mesh = ArrayMesh.new() + var arrays = [] + arrays.resize(ArrayMesh.ARRAY_MAX) + arrays[ArrayMesh.ARRAY_VERTEX] = vertices + # Create the Mesh. + arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) + var m = MeshInstance.new() + m.mesh = arr_mesh + [/codeblock] + The [code]MeshInstance[/code] is ready to be added to the SceneTree to be shown. </description> <tutorials> </tutorials> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index b66239181a..2e3cc2e5d1 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -4,7 +4,7 @@ Color in RGBA format with some support for ARGB format. </brief_description> <description> - A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values > 1. + A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values > 1. You can also create a color from standardised color names with Color.ColorN (e.g. Color.green) or [method @GDScript.ColorN]. </description> <tutorials> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 05b2c2704e..1a27aea23f 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -229,9 +229,9 @@ extends Control func get_drag_data(position): - var mydata = make_data() - set_drag_preview(make_preview(mydata)) - return mydata + var mydata = make_data() + set_drag_preview(make_preview(mydata)) + return mydata [/codeblock] </description> </method> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 26de8be42c..ab9b27542c 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -111,7 +111,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. + Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0). </description> </method> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 1355c74faf..c3ee309f0b 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -135,7 +135,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. + Returns the position between the vertex "idx" and the vertex "idx"+1, where "t" controls if the point is the first vertex (t = 0.0), the last vertex (t = 1.0), or in between. Values of "t" outside the range (0.0 >= t <=1) give strange, but predictable results. If "idx" is out of bounds it is truncated to the first or last vertex, and "t" is ignored. If the curve has no points, the function sends an error to the console, and returns (0, 0, 0). </description> </method> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index ade6d2034d..5a8b506f9e 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -93,10 +93,6 @@ Remitted if a resource is reimported. </description> </signal> - <signal name="script_classes_updated"> - <description> - </description> - </signal> <signal name="sources_changed"> <argument index="0" name="exist" type="bool"> </argument> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index b21d402468..aaba30ccc9 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -41,6 +41,7 @@ return FAILED var mesh = Mesh.new() + # Fill the Mesh with data read in 'file', left as exercise to the reader var filename = save_path + "." + get_save_extension() ResourceSaver.save(filename, mesh) diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index d85d021a68..f073c5e40b 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorInterface" inherits="Node" category="Core" version="3.1"> <brief_description> - Editor interface and main components. + Godot editor's interface. </brief_description> <description> - Editor interface. Allows saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects and provides access to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], [ScriptEditor], the editor viewport, as well as information about scenes. Also see [EditorPlugin] and [EditorScript]. + EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], [ScriptEditor], the editor viewport, and information about scenes. </description> <tutorials> </tutorials> @@ -24,14 +24,14 @@ <return type="Control"> </return> <description> - Returns the main container of Godot's editor window. You can use it, for example, to retrieve the size of the container and place your controls accordingly. + Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly. </description> </method> <method name="get_edited_scene_root"> <return type="Node"> </return> <description> - Returns the edited scene's root [Node]. + Returns the edited (current) scene's root [Node]. </description> </method> <method name="get_editor_settings"> @@ -52,7 +52,7 @@ <return type="Array"> </return> <description> - Returns an [Array] of the currently opened scenes. + Returns an [Array] with the file paths of the currently opened scenes. </description> </method> <method name="get_resource_filesystem"> @@ -66,7 +66,7 @@ <return type="EditorResourcePreview"> </return> <description> - Returns the [EditorResourcePreview]\ er. + Returns the [EditorResourcePreview]. </description> </method> <method name="get_script_editor"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 208780547e..ac139f18c9 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -4,7 +4,7 @@ Used by the editor to extend its functionality. </brief_description> <description> - Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. + Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. Also see [EditorScript] to add functions to the editor. </description> <tutorials> <link>http://docs.godotengine.org/en/3.0/development/plugins/index.html</link> @@ -31,7 +31,7 @@ <argument index="1" name="title" type="String"> </argument> <description> - Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_bottom_panel]. + Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [code]queue_free()[/code]. </description> </method> <method name="add_control_to_container"> @@ -44,7 +44,7 @@ <description> Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). - If your plugin is being removed, also make sure to remove your custom controls too. + When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [code]queue_free()[/code]. </description> </method> <method name="add_control_to_dock"> @@ -57,7 +57,7 @@ <description> Add the control to a specific dock slot (see DOCK_* enum for options). If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. - If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_docks]. + When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [code]queue_free()[/code]. </description> </method> <method name="add_custom_type"> @@ -74,7 +74,7 @@ <description> Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. - You can use the [method EditorPlugin.handles] to check if your custom object is being edited by checking the script or using 'is' keyword. + You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using 'is' keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. </description> </method> @@ -122,7 +122,7 @@ <argument index="3" name="ud" type="Variant" default="null"> </argument> <description> - Adds a custom menu to 'Project > Tools' as [code]name[/code] that calls [code]callback[/code] on an instance of [code]handler[/code] with a parameter [code]ud[/code] when user activates it. + Add a custom menu to 'Project > Tools' as [code]name[/code] that calls [code]callback[/code] on an instance of [code]handler[/code] with a parameter [code]ud[/code] when user activates it. </description> </method> <method name="add_tool_submenu_item"> @@ -133,6 +133,7 @@ <argument index="1" name="submenu" type="Object"> </argument> <description> + Like [method add_tool_menu_item] but adds the [code]submenu[/code] item inside the [code]name[/code] menu. </description> </method> <method name="apply_changes" qualifiers="virtual"> @@ -165,15 +166,21 @@ This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. </description> </method> - <method name="forward_canvas_gui_input" qualifiers="virtual"> - <return type="bool"> + <method name="forward_canvas_draw_over_viewport" qualifiers="virtual"> + <return type="void"> </return> - <argument index="0" name="event" type="InputEvent"> + <argument index="0" name="overlay" type="Control"> </argument> <description> + This method is called when there is an input event in the 2D viewport, e.g. the user clicks with the mouse in the 2D space (canvas GUI). Keep in mind that for this method to be called you have to first declare the virtual method [method handles] so the editor knows that you want to work with the workspace: + [codeblock] + func handles(object): + return true + [/codeblock] + Also note that the edited scene must have a root node. </description> </method> - <method name="forward_draw_over_viewport" qualifiers="virtual"> + <method name="forward_canvas_force_draw_over_viewport" qualifiers="virtual"> <return type="void"> </return> <argument index="0" name="overlay" type="Control"> @@ -181,10 +188,10 @@ <description> </description> </method> - <method name="forward_force_draw_over_viewport" qualifiers="virtual"> - <return type="void"> + <method name="forward_canvas_gui_input" qualifiers="virtual"> + <return type="bool"> </return> - <argument index="0" name="overlay" type="Control"> + <argument index="0" name="event" type="InputEvent"> </argument> <description> </description> @@ -197,8 +204,12 @@ <argument index="1" name="event" type="InputEvent"> </argument> <description> - Implement this function if you are interested in 3D view screen input events. It will be called only if currently selected node is handled by your plugin. - If you would like to always gets those input events then additionally use [method set_input_forwarding_always_enabled]. + This method is called when there is an input event in the 3D viewport, e.g. the user clicks with the mouse in the 3D space (spatial GUI). Keep in mind that for this method to be called you have to first declare the virtual method [method handles] so the editor knows that you want to work with the workspace: + [codeblock] + func handles(object): + return true + [/codeblock] + Also note that the edited scene must have a root node. </description> </method> <method name="get_breakpoints" qualifiers="virtual"> @@ -212,6 +223,7 @@ <return type="EditorInterface"> </return> <description> + Return the [EditorInterface] object that gives you control over Godot editor's window and its functionalities. </description> </method> <method name="get_plugin_icon" qualifiers="virtual"> @@ -253,7 +265,7 @@ <argument index="0" name="layout" type="ConfigFile"> </argument> <description> - Get the GUI layout of the plugin. This is used to save the project's editor layout when the [method EditorPlugin.queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). + Get the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). </description> </method> <method name="handles" qualifiers="virtual"> @@ -262,14 +274,14 @@ <argument index="0" name="object" type="Object"> </argument> <description> - Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions [method EditorPlugin.edit] and [method EditorPlugin.make_visible] called when the editor requests them. + Implement this function if your plugin edits a specific type of object (Resource or Node). If you return true, then you will get the functions [method EditorPlugin.edit] and [method EditorPlugin.make_visible] called when the editor requests them. If you have declared the methods [method forward_canvas_gui_input] and [method forward_spatial_gui_input] these will be called too. </description> </method> <method name="has_main_screen" qualifiers="virtual"> <return type="bool"> </return> <description> - Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script). + Return true if this is a main screen editor plugin (it goes in the workspaces selector together with '2D', '3D', and 'Script'). </description> </method> <method name="hide_bottom_panel"> @@ -318,7 +330,7 @@ <argument index="0" name="control" type="Control"> </argument> <description> - Remove the control from the bottom panel. Don't forget to call this if you added one, so the editor can remove it cleanly. + Remove the control from the bottom panel. You have to manually [code]queue_free()[/code] the control. </description> </method> <method name="remove_control_from_container"> @@ -329,7 +341,7 @@ <argument index="1" name="control" type="Control"> </argument> <description> - Remove the control from the specified container. Use it when cleaning up after adding a control with [method add_control_to_container]. Note that you can simply free the control if you won't use it anymore. + Remove the control from the specified container. You have to manually [code]queue_free()[/code] the control. </description> </method> <method name="remove_control_from_docks"> @@ -338,7 +350,7 @@ <argument index="0" name="control" type="Control"> </argument> <description> - Remove the control from the dock. Don't forget to call this if you added one, so the editor can save the layout and remove it cleanly. + Remove the control from the dock. You have to manually [code]queue_free()[/code] the control. </description> </method> <method name="remove_custom_type"> @@ -347,7 +359,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Remove a custom type added by [method EditorPlugin.add_custom_type] + Remove a custom type added by [method add_custom_type] </description> </method> <method name="remove_export_plugin"> @@ -441,7 +453,7 @@ <argument index="0" name="screen_name" type="String"> </argument> <description> - Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins. + Emitted when user change the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. </description> </signal> <signal name="resource_saved"> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index fb9af47b1f..c4dcbbbc82 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -16,10 +16,12 @@ </return> <argument index="0" name="from" type="Resource"> </argument> + <argument index="1" name="size" type="Vector2"> + </argument> <description> - Generate a preview from a given resource. This must be always implemented. - Returning an empty texture is an OK way to fail and let another generator take care. - Care must be taken because this function is always called from a thread (not the main thread). + Generate a preview from a given resource with the specified size. This must always be implemented. + Returning an empty texture is an OK way to fail and let another generator take care. + Care must be taken because this function is always called from a thread (not the main thread). </description> </method> <method name="generate_from_path" qualifiers="virtual"> @@ -27,10 +29,12 @@ </return> <argument index="0" name="path" type="String"> </argument> + <argument index="1" name="size" type="Vector2"> + </argument> <description> - Generate a preview directly from a path, implementing this is optional, as default code will load and call generate() - Returning an empty texture is an OK way to fail and let another generator take care. - Care must be taken because this function is always called from a thread (not the main thread). + Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method generate]. + Returning an empty texture is an OK way to fail and let another generator take care. + Care must be taken because this function is always called from a thread (not the main thread). </description> </method> <method name="handles" qualifiers="virtual"> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 09cae25403..76c105dd25 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -4,44 +4,45 @@ Post process scenes after import </brief_description> <description> - The imported scene can be automatically modified right after import by specifying a 'custom script' that inherits from this class. The [method post_import]-method receives the imported scene's root-node and returns the modified version of the scene - </description> - <tutorials> - <link>http://docs.godotengine.org/en/latest/learning/workflow/assets/importing_scenes.html?highlight=post%20import</link> - </tutorials> - <demos> + Imported scenes can be automatically modified right after import by setting their [i]Custom Script[/i] Import property to a [code]tool[/code] script that inherits from this class. + The [method post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example: [codeblock] -tool # needed so it runs in editor -extends EditorScenePostImport + tool # needed so it runs in editor + extends EditorScenePostImport -# This sample changes all node names + # This sample changes all node names -# get called right after the scene is imported and gets the root-node -func post_import(scene): - # change all node names to "modified_[oldnodename]" - iterate(scene) - return scene # remember to return the imported scene + # Called right after the scene is imported and gets the root node + func post_import(scene): + # change all node names to "modified_[oldnodename]" + iterate(scene) + return scene # remember to return the imported scene -func iterate(node): - if node!=null: - node.name = "modified_"+node.name - for child in node.get_children(): - iterate(child) -[/codeblock] + func iterate(node): + if node != null: + node.name = "modified_"+node.name + for child in node.get_children(): + iterate(child) + [/codeblock] + </description> + <tutorials> + <link>http://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link> + </tutorials> + <demos> </demos> <methods> <method name="get_source_file" qualifiers="const"> <return type="String"> </return> <description> - Returns the source-file-path which got imported (e.g. [code]res://scene.dae[/code] ) + Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]). </description> </method> <method name="get_source_folder" qualifiers="const"> <return type="String"> </return> <description> - Returns the resource-folder the imported scene-file is located in + Returns the resource folder the imported scene file is located in. </description> </method> <method name="post_import" qualifiers="virtual"> @@ -50,7 +51,7 @@ func iterate(node): <argument index="0" name="scene" type="Object"> </argument> <description> - Gets called after the scene got imported and has to return the modified version of the scene + Gets called after the scene got imported and has to return the modified version of the scene. </description> </method> </methods> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index bd85075b7e..9d48669a6b 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -48,11 +48,11 @@ Erase a given setting (pass full property path). </description> </method> - <method name="get_favorite_dirs" qualifiers="const"> + <method name="get_favorites" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Get the list of favorite directories for this project. + Get the list of favorite files and directories for this project. </description> </method> <method name="get_project_metadata" qualifiers="const"> @@ -122,13 +122,13 @@ <description> </description> </method> - <method name="set_favorite_dirs"> + <method name="set_favorites"> <return type="void"> </return> <argument index="0" name="dirs" type="PoolStringArray"> </argument> <description> - Set the list of favorite directories for this project. + Set the list of favorite files and directories for this project. </description> </method> <method name="set_initial_value"> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 55693bd49c..56accdcd9e 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -487,10 +487,10 @@ OpenGL texture format RG with two components and a bitdepth of 8 for each. </constant> <constant name="FORMAT_RGB8" value="4" enum="Format"> - OpenGL texture format RGB with three components, each with a bitdepth of 8. + OpenGL texture format RGB with three components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_RGBA8" value="5" enum="Format"> - OpenGL texture format RGBA with four components, each with a bitdepth of 8. + OpenGL texture format RGBA with four components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_RGBA4444" value="6" enum="Format"> OpenGL texture format RGBA with four components, each with a bitdepth of 4. @@ -526,13 +526,13 @@ A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single exponent. </constant> <constant name="FORMAT_DXT1" value="17" enum="Format"> - The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. + The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_DXT3" value="18" enum="Format"> - The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. + The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_DXT5" value="19" enum="Format"> - The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. + The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_RGTC_R" value="20" enum="Format"> Texture format that uses Red Green Texture Compression, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. More information can be found here https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression. @@ -541,7 +541,7 @@ Texture format that uses Red Green Texture Compression, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. </constant> <constant name="FORMAT_BPTC_RGBA" value="22" enum="Format"> - Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. + Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_BPTC_RGBF" value="23" enum="Format"> Texture format that uses BPTC compression with signed floating-point RGB components. @@ -550,7 +550,7 @@ Texture format that uses BPTC compression with unsigned floating-point RGB components. </constant> <constant name="FORMAT_PVRTC2" value="25" enum="Format"> - Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. + Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_PVRTC2A" value="26" enum="Format"> Same as PVRTC2, but with an alpha component. @@ -577,13 +577,13 @@ Ericsson Texture Compression format 2 variant SIGNED_RG11_EAC, which provides two channels of signed data. </constant> <constant name="FORMAT_ETC2_RGB8" value="34" enum="Format"> - Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. + Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_ETC2_RGBA8" value="35" enum="Format"> - Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. + Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_ETC2_RGB8A1" value="36" enum="Format"> - Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. + Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_MAX" value="37" enum="Format"> </constant> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 0bff3317db..5c57899468 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -36,7 +36,7 @@ <argument index="1" name="flags" type="int" default="7"> </argument> <description> - Create a new [code]ImageTexture[/code] from an [Image] with "flags" from [Texture].FLAG_*. + Create a new [code]ImageTexture[/code] from an [Image] with "flags" from [Texture].FLAG_*. An sRGB to linear color space conversion can take place, according to [Image].FORMAT_*. </description> </method> <method name="get_format" qualifiers="const"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index d9929b3d31..a0d6d29be6 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -95,6 +95,7 @@ <argument index="0" name="axis" type="String"> </argument> <description> + Returns the index of the provided axis name. </description> </method> <method name="get_joy_axis_string"> @@ -103,6 +104,7 @@ <argument index="0" name="axis_index" type="int"> </argument> <description> + Receives a [code]JOY_AXIS_*[/code] Enum and returns its equivalent name as a string. </description> </method> <method name="get_joy_button_index_from_string"> @@ -111,6 +113,7 @@ <argument index="0" name="button" type="String"> </argument> <description> + Returns the index of the provided button name. </description> </method> <method name="get_joy_button_string"> @@ -119,6 +122,7 @@ <argument index="0" name="button_index" type="int"> </argument> <description> + Receives a [code]JOY_BUTTON_*[/code] Enum and returns it's equivalent name as a string. </description> </method> <method name="get_joy_guid" qualifiers="const"> diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index 50641dceed..a3a9055087 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -18,7 +18,7 @@ Mouse button identifier, one of the BUTTON_* or BUTTON_WHEEL_* constants in [@GlobalScope]. </member> <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick"> - If [code]true[/code] the mouse button's state is a double-click. If [code]false[/code] the mouse button's state is released. + If [code]true[/code] the mouse button's state is a double-click. </member> <member name="factor" type="float" setter="set_factor" getter="get_factor"> Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 4723cf8ee4..38d32fe7c8 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -33,7 +33,7 @@ <argument index="2" name="selectable" type="bool" default="true"> </argument> <description> - Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon. + Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon. If selectable is true the list item will be selectable. </description> </method> @@ -222,7 +222,7 @@ </argument> <description> Select the item at the specified index. - Note: This method does not trigger the item selection signal. + Note: This method does not trigger the item selection signal. </description> </method> <method name="set_item_custom_bg_color"> diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml index 763b38f49e..9526604e6d 100644 --- a/doc/classes/LargeTexture.xml +++ b/doc/classes/LargeTexture.xml @@ -74,7 +74,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Sets the [Texture] of the piece with index "idx" to "ofs". + Sets the [Texture] of the piece with index "idx" to "texture". </description> </method> <method name="set_size"> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index e878b3a746..ea6fe6d11c 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -92,13 +92,13 @@ </signals> <constants> <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> - Packets are sent via unordered UDP packets. + Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [code]TRANSFER_MODE_UNRELIABLE_ORDERED[/code]. Use for non-critical data, and always consider whether the order matters. </constant> <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode"> - Packets are sent via ordered UDP packets. + Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [code]TRANSFER_MODE_RELIABLE[/code]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. </constant> <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode"> - Packets are sent via TCP packets. + Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. </constant> <constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus"> The ongoing connection disconnected. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index d00652d40c..90e9436307 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -266,6 +266,15 @@ Returns the parent node of the current node, or an empty [code]Node[/code] if the node lacks a parent. </description> </method> + <method name="find_parent" qualifiers="const"> + <return type="Node"> + </return> + <argument index="0" name="mask" type="String"> + </argument> + <description> + Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. + </description> + </method> <method name="get_path" qualifiers="const"> <return type="NodePath"> </return> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index c41084f853..dad4ce898d 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -101,7 +101,7 @@ </argument> <description> Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable. - The arguments are used in the given order and separated by a space, so [code]OS.execute('ping', ['-c', '3', 'godotengine.org'])[/code] will resolve to [code]ping -c 3 godotengine.org[/code] in the system's shell. + The arguments are used in the given order and separated by a space, so [code]OS.execute('ping', ['-w', '3', 'godotengine.org'], false)[/code] will resolve to [code]ping -w 3 godotengine.org[/code] in the system's shell. This method has slightly different behaviour based on whether the [code]blocking[/code] mode is enabled. When [code]blocking[/code] is enabled, the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the [code]output[/code] array as a single string. When the process terminates, the Godot thread will resume execution. When [code]blocking[/code] is disabled, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so [code]output[/code] will be empty. diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 8d810bc9c4..0d58e61c3a 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -11,7 +11,7 @@ var scene = PackedScene.new() var result = scene.pack(child) if result == OK: - ResourceSaver.save("res://path/name.scn", scene) // or user://... + ResourceSaver.save("res://path/name.scn", scene) # or user://... [/codeblock] </description> <tutorials> diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml index 483c71b2c0..aa54d9a11a 100644 --- a/doc/classes/Physics2DDirectSpaceState.xml +++ b/doc/classes/Physics2DDirectSpaceState.xml @@ -117,7 +117,7 @@ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the second parameter, to reduce the processing time. + The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. </description> </method> </methods> diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index 2f7cf5a8f3..1fd00fa21c 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -21,7 +21,7 @@ </argument> <description> Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [1, 1]. - If the shape can not move, the array will be empty. + If the shape can not move, the returned array will be [0, 0]. </description> </method> <method name="collide_shape"> @@ -41,7 +41,7 @@ <argument index="0" name="shape" type="PhysicsShapeQueryParameters"> </argument> <description> - Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields: + Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: [code]collider_id[/code]: The colliding object's ID. [code]linear_velocity[/code]: The colliding object's velocity [Vector3]. If the object is an [Area], the result is [code](0, 0, 0)[/code]. [code]normal[/code]: The object's surface normal at the intersection point. @@ -91,7 +91,7 @@ [code]collider_id[/code]: The colliding object's ID. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the second parameter, to reduce the processing time. + The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. </description> </method> </methods> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index 88a104cb11..f79baea0be 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -1518,9 +1518,7 @@ <constant name="BODY_MODE_RIGID" value="2" enum="BodyMode"> Constant for rigid bodies. </constant> - <constant name="BODY_MODE_SOFT" value="3" enum="BodyMode"> - </constant> - <constant name="BODY_MODE_CHARACTER" value="4" enum="BodyMode"> + <constant name="BODY_MODE_CHARACTER" value="3" enum="BodyMode"> Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. </constant> <constant name="BODY_PARAM_BOUNCE" value="0" enum="BodyParameter"> diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml index 765e68a623..ae722b1053 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PoolByteArray.xml @@ -129,7 +129,7 @@ <argument index="1" name="to" type="int"> </argument> <description> - Returns the slice of the [code]PoolByteArray[/code] between indices (inclusive) as a new [code]PoolByteArray[/code]. Any negative index is considered to be from the end of the array. + Returns the slice of the [code]PoolByteArray[/code] between indices (inclusive) as a new [code]PoolByteArray[/code]. Any negative index is considered to be from the end of the array. </description> </method> </methods> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 548d60fe35..c05d6bc849 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -609,9 +609,6 @@ <member name="network/remote_fs/page_size" type="int" setter="" getter=""> Page size used by remote filesystem. </member> - <member name="network/ssl/certificates" type="String" setter="" getter=""> - If your game or application uses HTTPS, a certificates file is needed. It must be set here. - </member> <member name="node/name_casing" type="int" setter="" getter=""> When creating nodes names automatically, set the type of casing in this project. This is mostly an editor setting. </member> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 9eb1462542..a289b68c9a 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -4,7 +4,7 @@ Handle for a [Resource]'s unique ID. </brief_description> <description> - The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer]. + The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer]. </description> <tutorials> </tutorials> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index e4d1ecb7f8..afb80f2f6e 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -44,7 +44,7 @@ <return type="void"> </return> <description> - Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. + Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. </description> </method> <method name="get_collider" qualifiers="const"> diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index eea1e0321b..f9e0f821a9 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -88,7 +88,7 @@ <return type="Array"> </return> <description> - Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_axis_velocity"> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 02f58a88cb..d310561233 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -4,7 +4,7 @@ A helper node for displaying scrollable elements (e.g. lists). </brief_description> <description> - A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). + A ScrollContainer node with a [Control] child and scrollbar child ([HScrollbar], [VScrollBar], or both) will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). </description> <tutorials> </tutorials> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index ebe29c7e24..74ac8a79c0 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -81,10 +81,10 @@ <method name="get_string"> <return type="String"> </return> - <argument index="0" name="bytes" type="int"> + <argument index="0" name="bytes" type="int" default="-1"> </argument> <description> - Get a string with byte-length "bytes" from the stream. + Get a string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. </description> </method> <method name="get_u16"> @@ -118,10 +118,10 @@ <method name="get_utf8_string"> <return type="String"> </return> - <argument index="0" name="bytes" type="int"> + <argument index="0" name="bytes" type="int" default="-1"> </argument> <description> - Get a utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8). + Get a utf8 string with byte-length [code]bytes[/code] from the stream (this decodes the string sent as utf8). If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string]. </description> </method> <method name="get_var"> @@ -203,6 +203,15 @@ Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent. </description> </method> + <method name="put_string"> + <return type="void"> + </return> + <argument index="0" name="value" type="String"> + </argument> + <description> + Put a zero-terminated ascii string into the stream prepended by a 32 bits unsigned integer representing its size. + </description> + </method> <method name="put_u16"> <return type="void"> </return> @@ -245,7 +254,7 @@ <argument index="0" name="value" type="String"> </argument> <description> - Put a zero-terminated utf8 string into the stream. + Put a zero-terminated utf8 string into the stream prepended by a 32 bits unsigned integer representing its size. </description> </method> <method name="put_var"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 49549a9892..6f8c76d1ea 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -248,7 +248,7 @@ Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED. </member> <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size"> - The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. + The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. </member> <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size"> The TileMap's cell size. @@ -278,7 +278,7 @@ The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. </member> <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask"> - The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). + The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset"> The assigned [TileSet]. diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index b98161e483..3f0d6317a6 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -85,7 +85,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Creates a new tile which will be referenced by the given ID. + Creates a new tile with the given ID. </description> </method> <method name="find_tile_by_name" qualifiers="const"> @@ -117,7 +117,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Removes the tile referenced by the given ID. + Removes the given tile ID. </description> </method> <method name="tile_add_shape"> @@ -134,6 +134,7 @@ <argument index="4" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> + Adds a shape to the tile. </description> </method> <method name="tile_get_light_occluder" qualifiers="const"> @@ -142,7 +143,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the light occluder of the tile. + Returns the tile's light occluder. </description> </method> <method name="tile_get_material" qualifiers="const"> @@ -151,7 +152,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the material of the tile. + Returns the tile's material. </description> </method> <method name="tile_get_modulate" qualifiers="const"> @@ -160,6 +161,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the tile's modulation color. </description> </method> <method name="tile_get_name" qualifiers="const"> @@ -168,7 +170,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the name of the tile. + Returns the tile's name. </description> </method> <method name="tile_get_navigation_polygon" qualifiers="const"> @@ -195,6 +197,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the tile's normal map texture. </description> </method> <method name="tile_get_occluder_offset" qualifiers="const"> @@ -223,6 +226,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> + Returns a tile's given shape. </description> </method> <method name="tile_get_shape_count" qualifiers="const"> @@ -231,6 +235,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the number of shapes assigned to a tile. </description> </method> <method name="tile_get_shape_offset" qualifiers="const"> @@ -241,6 +246,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> + Returns the offset of a tile's shape. </description> </method> <method name="tile_get_shape_one_way" qualifiers="const"> @@ -251,6 +257,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> + Returns the one-way collision value of a tile's shape. </description> </method> <method name="tile_get_shape_transform" qualifiers="const"> @@ -261,6 +268,7 @@ <argument index="1" name="shape_id" type="int"> </argument> <description> + Returns the [Transform2D] of a tile's sahpe. </description> </method> <method name="tile_get_shapes" qualifiers="const"> @@ -269,7 +277,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the array of shapes of the tile. + Returns an array of the tile's shapes. </description> </method> <method name="tile_get_texture" qualifiers="const"> @@ -278,7 +286,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the texture of the tile. + Returns the tile's texture. </description> </method> <method name="tile_get_texture_offset" qualifiers="const"> @@ -296,6 +304,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the tile's [enum TileMode]. </description> </method> <method name="tile_get_z_index" qualifiers="const"> @@ -304,6 +313,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the tile's z-index (drawing layer). </description> </method> <method name="tile_set_light_occluder"> @@ -391,7 +401,7 @@ <argument index="1" name="occluder_offset" type="Vector2"> </argument> <description> - Set an offset for the tile's light occluder. + Sets an offset for the tile's light occluder. </description> </method> <method name="tile_set_region"> @@ -402,7 +412,7 @@ <argument index="1" name="region" type="Rect2"> </argument> <description> - Set the tile's sub-region in the texture. This is common in texture atlases. + Sets the tile's sub-region in the texture. This is common in texture atlases. </description> </method> <method name="tile_set_shape"> @@ -415,6 +425,7 @@ <argument index="2" name="shape" type="Shape2D"> </argument> <description> + Sets a shape for the tile, enabling collision. </description> </method> <method name="tile_set_shape_offset"> @@ -427,6 +438,7 @@ <argument index="2" name="shape_offset" type="Vector2"> </argument> <description> + Sets the offset of a tile's shape. </description> </method> <method name="tile_set_shape_one_way"> @@ -439,6 +451,7 @@ <argument index="2" name="one_way" type="bool"> </argument> <description> + Enables one-way collision on a tile's shape. </description> </method> <method name="tile_set_shape_transform"> @@ -451,6 +464,7 @@ <argument index="2" name="shape_transform" type="Transform2D"> </argument> <description> + Sets a [Transform2D] on a tile's shape. </description> </method> <method name="tile_set_shapes"> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index ae8bdace73..0431718066 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -94,7 +94,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - If [member drop_mode_flags] includes [code]DROP_MODE_INBETWEEN[/code], returns -1 if [code]position[/code] is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if [member drop_mode_flags] includes [code]DROP_MODE_ON_ITEM[/code]. + If [member drop_mode_flags] includes [code]DROP_MODE_INBETWEEN[/code], returns -1 if [code]position[/code] is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if [member drop_mode_flags] includes [code]DROP_MODE_ON_ITEM[/code]. Otherwise, returns 0. If there are no tree item at [code]position[/code], returns -100. </description> </method> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 123226183a..1dc03ed314 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -9,8 +9,8 @@ [codeblock] var tween = get_node("Tween") tween.interpolate_property($Node2D, "position", - Vector2(0, 0), Vector2(100, 100), 1, - Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) + Vector2(0, 0), Vector2(100, 100), 1, + Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() [/codeblock] Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. @@ -44,7 +44,7 @@ </argument> <description> Follows [code]method[/code] of [code]object[/code] and applies the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are called with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information </description> </method> <method name="follow_property"> @@ -70,7 +70,7 @@ </argument> <description> Follows [code]property[/code] of [code]object[/code] and applies it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information </description> </method> <method name="get_runtime" qualifiers="const"> @@ -147,7 +147,7 @@ </argument> <description> Animates [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are called with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information </description> </method> <method name="interpolate_property"> @@ -171,7 +171,7 @@ </argument> <description> Animates [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Setting the initial value to [code]null[/code] uses the current value of the property. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information </description> </method> <method name="is_active" qualifiers="const"> @@ -301,7 +301,7 @@ </argument> <description> Animates [code]method[/code] of [code]object[/code] from the value returned by [code]initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information </description> </method> <method name="targeting_property"> @@ -327,7 +327,7 @@ </argument> <description> Animates [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information </description> </method> <method name="tell" qualifiers="const"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index a721ef50c5..7e03e7f0fe 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -227,7 +227,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. Both vectors need to be normalized. </description> </method> diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml index 83ba9495e5..5f0a4ef0f4 100644 --- a/doc/classes/VisibilityEnabler.xml +++ b/doc/classes/VisibilityEnabler.xml @@ -14,8 +14,10 @@ </methods> <members> <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] [RigidBody] nodes will be paused. </member> <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] [AnimationPlayer] nodes will be paused. </member> </members> <constants> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index 8dfbaec6e8..eab9bd1991 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -14,16 +14,22 @@ </methods> <members> <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] [RigidBody2D] nodes will be paused. </member> <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] [AnimatedSprite] nodes will be paused. </member> <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] [AnimationPlayer] nodes will be paused. </member> <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] [Particles2D] nodes will be paused. </member> <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] the parent's [method Node._physics_process] will be stopped. </member> <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + If [code]true[/code] the parent's [method Node._process] will be stopped. </member> </members> <constants> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index ef3c3d72eb..0c5536b5fe 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -35,7 +35,7 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return -0.001. + Cast a [String] value to a floating point value. This method accepts float value strings like [code] '1.23' [/code] and exponential notation strings for its parameter so calling [code] float('1e3') [/code] will return 1000.0 and calling [code] float('1e-3') [/code] will return 0.001. </description> </method> </methods> |