diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 2 | ||||
-rw-r--r-- | doc/classes/BaseButton.xml | 2 | ||||
-rw-r--r-- | doc/classes/CanvasItem.xml | 9 | ||||
-rw-r--r-- | doc/classes/EditorSettings.xml | 3 | ||||
-rw-r--r-- | doc/classes/Engine.xml | 4 | ||||
-rw-r--r-- | doc/classes/PCKPacker.xml | 4 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 5 | ||||
-rw-r--r-- | doc/classes/Resource.xml | 49 | ||||
-rw-r--r-- | doc/classes/ResourceSaver.xml | 8 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 3 | ||||
-rwxr-xr-x | doc/tools/make_rst.py | 8 |
11 files changed, 85 insertions, 12 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index f222cbc969..a86f41cd9c 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -856,7 +856,7 @@ GD.Print("a", "b", a); // Prints ab[1, 2, 3] [/csharp] [/codeblocks] - [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. + [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also [member Engine.print_to_stdout] and [member ProjectSettings.application/run/disable_stdout]. </description> </method> <method name="print_rich" qualifiers="vararg"> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 764f4a65b5..18dccfa5a9 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -57,7 +57,7 @@ </member> <member name="button_pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code]. - [b]Note:[/b] Setting [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal]. + [b]Note:[/b] Changing the value of [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal]. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false" keywords="enabled"> If [code]true[/code], the button is in disabled state and can't be clicked or toggled. diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 0a0223c550..423059a0c7 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -528,6 +528,7 @@ <description> Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see [method _draw]). Visibility is checked only in parent nodes that inherit from [CanvasItem], [CanvasLayer], and [Window]. If the parent is of any other type (such as [Node], [AnimationPlayer], or [Node3D]), it is assumed to be visible. + [b]Note:[/b] This method does not take [member visibility_layer] into account, so even if this method returns [code]true[/code] the node might end up not being rendered. </description> </method> <method name="make_canvas_position_local" qualifiers="const"> @@ -622,7 +623,7 @@ The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> - If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its ancestors are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). + If [code]true[/code], this [CanvasItem] may be drawn. Whether this [CanvasItem] is actually drawn depends on the visibility of all of its [CanvasItem] ancestors. In other words: this [CanvasItem] will be drawn when [method is_visible_in_tree] returns [code]true[/code] and all [CanvasItem] ancestors share at least one [member visibility_layer] with this [CanvasItem]. [b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. </member> <member name="y_sort_enabled" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false"> @@ -647,17 +648,17 @@ </signal> <signal name="hidden"> <description> - Emitted when becoming hidden. + Emitted when the [CanvasItem] becomes hidden, either because its own [member visible] property was set to [code]false[/code] or the [member visible] property of one of its [CanvasItem] ancestors was set to [code]false[/code]. </description> </signal> <signal name="item_rect_changed"> <description> - Emitted when the item's [Rect2] boundaries (position or size) have changed, or when an action is taking place that may have impacted these boundaries (e.g. changing [member Sprite2D.texture]). + Emitted when the [CanvasItem]'s boundaries (position or size) change, or when an action took place that may have affected these boundaries (e.g. changing [member Sprite2D.texture]). </description> </signal> <signal name="visibility_changed"> <description> - Emitted when the visibility (hidden/visible) changes. + Emitted when the [CanvasItem]'s visibility changes, either because its own [member visible] property changed or because the visility of one of its [CanvasItem] ancestors changed (equivalent to a change in [method is_visible_in_tree]). </description> </signal> </signals> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 940fec4688..5eb8ac6199 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -1200,6 +1200,9 @@ <member name="text_editor/behavior/files/trim_trailing_whitespace_on_save" type="bool" setter="" getter=""> If [code]true[/code], trims trailing whitespace when saving a script. Trailing whitespace refers to tab and space characters placed at the end of lines. Since these serve no practical purpose, they can and should be removed to make version control diffs less noisy. </member> + <member name="text_editor/behavior/general/empty_selection_clipboard" type="bool" setter="" getter=""> + If [code]true[/code], copying or cutting without a selection is performed on all lines with a caret. Otherwise, copy and cut require a selection. + </member> <member name="text_editor/behavior/indent/auto_indent" type="bool" setter="" getter=""> If [code]true[/code], automatically indents code when pressing the [kbd]Enter[/kbd] key based on blocks above the new line. </member> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index ca78054875..bba5157053 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -337,6 +337,10 @@ [b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor. [b]Warning:[/b] If set to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. In a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default). </member> + <member name="print_to_stdout" type="bool" setter="set_print_to_stdout" getter="is_printing_to_stdout" default="true"> + If [code]false[/code], stops printing messages (for example using [method @GlobalScope.print]) to the console, log files, and editor Output log. This property is equivalent to the [member ProjectSettings.application/run/disable_stdout] project setting. + [b]Note:[/b] This does not stop printing errors or warnings produced by scripts to the console or log files, for more details see [member print_error_messages]. + </member> <member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0"> The speed multiplier at which the in-game clock updates, compared to real time. For example, if set to [code]2.0[/code] the game runs twice as fast, and if set to [code]0.5[/code] the game runs half as fast. This value affects [Timer], [SceneTreeTimer], and all other simulations that make use of [code]delta[/code] time (such as [method Node._process] and [method Node._physics_process]). diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index 494e9966ac..ec0300c068 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -42,12 +42,12 @@ </method> <method name="pck_start"> <return type="int" enum="Error" /> - <param index="0" name="pck_name" type="String" /> + <param index="0" name="pck_path" type="String" /> <param index="1" name="alignment" type="int" default="32" /> <param index="2" name="key" type="String" default=""0000000000000000000000000000000000000000000000000000000000000000"" /> <param index="3" name="encrypt_directory" type="bool" default="false" /> <description> - Creates a new PCK file with the name [param pck_name]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [param pck_name] (even though it's not required). + Creates a new PCK file at the file path [param pck_path]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [param pck_path] (even though it's not required). </description> </method> </methods> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 758e98ad85..0e5097b7b2 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -314,11 +314,11 @@ </member> <member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false"> If [code]true[/code], disables printing to standard error. If [code]true[/code], this also hides error and warning messages printed by [method @GlobalScope.push_error] and [method @GlobalScope.push_warning]. See also [member application/run/disable_stdout]. - Changes to this setting will only be applied upon restarting the application. + Changes to this setting will only be applied upon restarting the application. To control this at runtime, use [member Engine.print_error_messages]. </member> <member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false"> If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. See also [member application/run/disable_stderr]. - Changes to this setting will only be applied upon restarting the application. + Changes to this setting will only be applied upon restarting the application. To control this at runtime, use [member Engine.print_to_stdout]. </member> <member name="application/run/enable_alt_space_menu" type="bool" setter="" getter="" default="false"> If [code]true[/code], allows the [kbd]Alt + Space[/kbd] keys to display the window menu. This menu allows the user to perform various window management operations such as moving, resizing, or minimizing the window. @@ -2293,6 +2293,7 @@ <member name="physics/3d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 3D physics. "DEFAULT" and "GodotPhysics3D" are the same, as there is currently no alternative 3D physics server implemented. + "Dummy" is a 3D physics server that does nothing and returns only dummy values, effectively disabling all 3D physics functionality. </member> <member name="physics/3d/run_on_separate_thread" type="bool" setter="" getter="" default="false"> If [code]true[/code], the 3D physics server runs on a separate thread, making better use of multi-core CPUs. If [code]false[/code], the 3D physics server runs on the main thread. Running the physics server on a separate thread can increase performance, but restricts API access to only physics process. diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index fe09472c14..18d4047339 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -20,6 +20,19 @@ Override this method to return a custom [RID] when [method get_rid] is called. </description> </method> + <method name="_reset_state" qualifiers="virtual"> + <return type="void" /> + <description> + For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], this method should be implemented to correctly clear the resource's state. + </description> + </method> + <method name="_set_path_cache" qualifiers="virtual const"> + <return type="void" /> + <param index="0" name="path" type="String" /> + <description> + Sets the resource's path to [param path] without involving the resource cache. + </description> + </method> <method name="_setup_local_to_scene" qualifiers="virtual"> <return type="void" /> <description> @@ -68,6 +81,14 @@ Generates a unique identifier for a resource to be contained inside a [PackedScene], based on the current date, time, and a random value. The returned string is only composed of letters ([code]a[/code] to [code]y[/code]) and numbers ([code]0[/code] to [code]8[/code]). See also [member resource_scene_unique_id]. </description> </method> + <method name="get_id_for_path" qualifiers="const"> + <return type="String" /> + <param index="0" name="path" type="String" /> + <description> + Returns the unique identifier for the resource with the given [param path] from the resource cache. If the resource is not loaded and cached, an empty string is returned. + [b]Note:[/b] This method is only implemented when running in an editor context. At runtime, it returns an empty string. + </description> + </method> <method name="get_local_scene" qualifiers="const"> <return type="Node" /> <description> @@ -80,6 +101,34 @@ Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialized server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID]. </description> </method> + <method name="is_built_in" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the resource is built-in (from the engine) or [code]false[/code] if it is user-defined. + </description> + </method> + <method name="reset_state"> + <return type="void" /> + <description> + For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], override [method _reset_state] to correctly clear the resource's state. + </description> + </method> + <method name="set_id_for_path"> + <return type="void" /> + <param index="0" name="path" type="String" /> + <param index="1" name="id" type="String" /> + <description> + Sets the unique identifier to [param id] for the resource with the given [param path] in the resource cache. If the unique identifier is empty, the cache entry using [param path] is removed if it exists. + [b]Note:[/b] This method is only implemented when running in an editor context. + </description> + </method> + <method name="set_path_cache"> + <return type="void" /> + <param index="0" name="path" type="String" /> + <description> + Sets the resource's path to [param path] without involving the resource cache. + </description> + </method> <method name="setup_local_to_scene" deprecated="This method should only be called internally."> <return type="void" /> <description> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index 42c9bd7a3c..05c749bc24 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -26,6 +26,14 @@ Returns the list of extensions available for saving a resource of a given type. </description> </method> + <method name="get_resource_id_for_path"> + <return type="int" /> + <param index="0" name="path" type="String" /> + <param index="1" name="generate" type="bool" default="false" /> + <description> + Returns the resource ID for the given path. If [param generate] is [code]true[/code], a new resource ID will be generated if one for the path is not found. If [param generate] is [code]false[/code] and the path is not found, [constant ResourceUID.INVALID_ID] is returned. + </description> + </method> <method name="remove_resource_format_saver"> <return type="void" /> <param index="0" name="format_saver" type="ResourceFormatSaver" /> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 9fada9db35..42558bf992 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1299,6 +1299,9 @@ <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true" keywords="readonly, disabled, enabled"> If [code]false[/code], existing text cannot be modified and new text cannot be added. </member> + <member name="empty_selection_clipboard_enabled" type="bool" setter="set_empty_selection_clipboard_enabled" getter="is_empty_selection_clipboard_enabled" default="true"> + If [code]true[/code], copying or cutting without a selection is performed on all lines with a caret. Otherwise, copy and cut require a selection. + </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" /> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false"> If [code]true[/code], all occurrences of the selected text will be highlighted. diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 101660881b..e1a6aa4a98 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -150,7 +150,7 @@ PACKED_ARRAY_TYPES: List[str] = [ "PackedByteArray", "PackedColorArray", "PackedFloat32Array", - "Packedfloat64Array", + "PackedFloat64Array", "PackedInt32Array", "PackedInt64Array", "PackedStringArray", @@ -949,13 +949,17 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: inherits = class_def.inherits.strip() f.write(f'**{translate("Inherits:")}** ') first = True - while inherits in state.classes: + while inherits is not None: if not first: f.write(" **<** ") else: first = False f.write(make_type(inherits, state)) + + if inherits not in state.classes: + break # Parent unknown. + inode = state.classes[inherits].inherits if inode: inherits = inode.strip() |