diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Directory.xml | 4 | ||||
-rw-r--r-- | doc/classes/HTTPRequest.xml | 10 | ||||
-rw-r--r-- | doc/classes/PackedScene.xml | 7 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 6 | ||||
-rw-r--r-- | doc/classes/Resource.xml | 3 | ||||
-rw-r--r-- | doc/classes/Timer.xml | 1 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeMultiplyAdd.xml | 29 |
7 files changed, 55 insertions, 5 deletions
diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index ed4257a809..a86dbfedde 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -5,7 +5,7 @@ </brief_description> <description> Directory type. It is used to manage directories and their content (not restricted to the project folder). - When creating a new [Directory], its default opened directory will be [code]res://[/code]. This may change in the future, so it is advised to always use [method open] to initialize your [Directory] where you want to operate, with explicit error checking. + When creating a new [Directory], it must be explicitly opened using [method open] before most methods can be used. However, [method file_exists] and [method dir_exists] can be used without opening a directory. If so, they use a path relative to [code]res://[/code]. Here is an example on how to iterate through the files of a directory: [codeblock] func dir_contents(path): @@ -63,6 +63,7 @@ </argument> <description> Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. + If the [Directory] is not open, the path is relative to [code]res://[/code]. </description> </method> <method name="file_exists"> @@ -72,6 +73,7 @@ </argument> <description> Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. + If the [Directory] is not open, the path is relative to [code]res://[/code]. </description> </method> <method name="get_current_dir"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 53ca1fc6a9..0b0d71fccf 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -14,11 +14,19 @@ add_child(http_request) http_request.connect("request_completed", self, "_http_request_completed") - # Perform the HTTP request. The URL below returns some JSON as of writing. + # Perform a GET request. The URL below returns JSON as of writing. var error = http_request.request("https://httpbin.org/get") if error != OK: push_error("An error occurred in the HTTP request.") + # Perform a POST request. The URL below returns JSON as of writing. + # Note: Don't make simultaneous requests using a single HTTPRequest node. + # The snippet below is provided for reference only. + var body = {"name": "Godette"} + var error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body) + if error != OK: + push_error("An error occurred in the HTTP request.") + # Called when the HTTP request is completed. func _http_request_completed(result, response_code, headers, body): diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 2d70dea012..bb56330248 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -7,6 +7,13 @@ A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). [b]Note:[/b] The node doesn't need to own itself. + [b]Example of loading a saved scene:[/b] + [codeblock] + # Use `load()` instead of `preload()` if the path isn't known at compile-time. + var scene = preload("res://scene.tscn").instance() + # Add the node as a child of the node the script is attached to. + add_child(scene) + [/codeblock] [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. [codeblock] # Create the objects. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 6a7a6b84f6..c8427ac61f 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -802,10 +802,12 @@ <member name="logging/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false"> If [code]true[/code], logs all output to files. </member> - <member name="logging/file_logging/log_path" type="String" setter="" getter="" default=""user://logs/log.txt""> + <member name="logging/file_logging/enable_file_logging.pc" type="bool" setter="" getter="" default="true"> + </member> + <member name="logging/file_logging/log_path" type="String" setter="" getter="" default=""user://logs/godot.log""> Path to logs within the project. Using an [code]user://[/code] path is recommended. </member> - <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="10"> + <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="5"> Specifies the maximum amount of log files allowed (used for rotation). </member> <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="1024"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 5bc34772c8..0aa40dffb3 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -23,7 +23,8 @@ <argument index="0" name="subresources" type="bool" default="false"> </argument> <description> - Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency, this can be changed by passing [code]true[/code] to the [code]subresources[/code] argument. + Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. + [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. </description> </method> <method name="get_local_scene" qualifiers="const"> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index c1e5987a06..5d684755fa 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -5,6 +5,7 @@ </brief_description> <description> Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. + [b]Note:[/b] To create an one-shot timer without instantiating a node, use [method SceneTree.create_timer]. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml new file mode 100644 index 0000000000..ba79b3fe8f --- /dev/null +++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeMultiplyAdd" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Performs a fused multiply-add operation within the visual shader graph. + </brief_description> + <description> + Uses three operands to compute [code](a * b + c)[/code] expression. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="type" type="int" setter="set_type" getter="get_type" enum="VisualShaderNodeMultiplyAdd.Type" default="0"> + A type of operands and returned value. + </member> + </members> + <constants> + <constant name="TYPE_SCALAR" value="0" enum="Type"> + A scalar type. + </constant> + <constant name="TYPE_VECTOR" value="1" enum="Type"> + A vector type. + </constant> + <constant name="TYPE_MAX" value="2" enum="Type"> + Represents the size of the [enum Type] enum. + </constant> + </constants> +</class> |