From 1cf6d21f69a595b6047dabdfcd3cfb0b26e881c4 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Thu, 2 Dec 2021 23:15:17 +0300 Subject: [PATCH] Make overridden properties link to parent definition Co-authored-by: Josh DeGraw --- doc/classes/AcceptDialog.xml | 2 +- doc/classes/AnimatedTexture.xml | 2 +- .../AnimationNodeStateMachinePlayback.xml | 2 +- doc/classes/AtlasTexture.xml | 2 +- doc/classes/BaseButton.xml | 2 +- doc/classes/BoxContainer.xml | 2 +- doc/classes/ButtonGroup.xml | 2 +- doc/classes/CameraTexture.xml | 2 +- doc/classes/CheckBox.xml | 4 +-- doc/classes/CheckButton.xml | 4 +-- doc/classes/ColorPickerButton.xml | 2 +- doc/classes/ConfirmationDialog.xml | 4 +-- doc/classes/DirectionalLight.xml | 2 +- doc/classes/EditorFileDialog.xml | 6 ++-- doc/classes/EditorInspector.xml | 2 +- doc/classes/EditorSpinSlider.xml | 2 +- doc/classes/ExternalTexture.xml | 2 +- doc/classes/FileDialog.xml | 4 +-- doc/classes/GraphEdit.xml | 4 +-- doc/classes/GridContainer.xml | 2 +- doc/classes/ImageTexture.xml | 2 +- doc/classes/ItemList.xml | 4 +-- doc/classes/Label.xml | 4 +-- doc/classes/LargeTexture.xml | 2 +- doc/classes/LineEdit.xml | 4 +-- doc/classes/LinkButton.xml | 4 +-- doc/classes/MenuButton.xml | 8 ++--- doc/classes/MeshTexture.xml | 2 +- doc/classes/NinePatchRect.xml | 2 +- doc/classes/OptionButton.xml | 6 ++-- doc/classes/ParallaxBackground.xml | 2 +- doc/classes/Path2D.xml | 2 +- doc/classes/PhysicsBody2D.xml | 2 +- doc/classes/Popup.xml | 2 +- doc/classes/PopupMenu.xml | 2 +- doc/classes/ProgressBar.xml | 4 +-- doc/classes/ProxyTexture.xml | 2 +- doc/classes/RichTextLabel.xml | 2 +- doc/classes/RoomManager.xml | 2 +- doc/classes/ScriptCreateDialog.xml | 10 +++--- doc/classes/ScrollBar.xml | 4 +-- doc/classes/ScrollContainer.xml | 2 +- doc/classes/Slider.xml | 4 +-- doc/classes/StreamTexture.xml | 2 +- doc/classes/TextEdit.xml | 4 +-- doc/classes/Texture3D.xml | 4 +-- doc/classes/TextureProgress.xml | 2 +- doc/classes/TextureRect.xml | 2 +- doc/classes/ToolButton.xml | 2 +- doc/classes/Tree.xml | 4 +-- doc/classes/VScrollBar.xml | 4 +-- doc/classes/VSlider.xml | 4 +-- doc/classes/VehicleBody.xml | 4 +-- doc/classes/ViewportTexture.xml | 4 +-- doc/tools/make_rst.py | 19 +++++------ editor/doc/doc_data.cpp | 12 +++++-- editor/doc/doc_data.h | 1 + editor/editor_help.cpp | 32 +++++++++++++++---- .../doc_classes/NetworkedMultiplayerENet.xml | 4 +-- modules/gltf/doc_classes/PackedSceneGLTF.xml | 2 +- .../opensimplex/doc_classes/NoiseTexture.xml | 2 +- .../webrtc/doc_classes/WebRTCMultiplayer.xml | 4 +-- .../doc_classes/WebSocketMultiplayerPeer.xml | 4 +-- 63 files changed, 137 insertions(+), 111 deletions(-) diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 7362b4dc13..145983a85f 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -68,7 +68,7 @@ The text displayed by the dialog. - + diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index df73bf7ebd..5c7fff3053 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -55,7 +55,7 @@ Sets the currently visible frame of the texture. - + Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds. diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 698a7972c2..dfb04fe4e2 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -66,7 +66,7 @@ - + diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index 6667b8f176..dd84c16b6b 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -19,7 +19,7 @@ If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels. - + The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin. diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 4791afa4ef..a9ab1caeaa 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -57,7 +57,7 @@ [i]Deprecated.[/i] This property has been deprecated due to redundancy and will be removed in Godot 4.0. This property no longer has any effect when set. Please use [member Control.focus_mode] instead. - + [ButtonGroup] associated to the button. diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index 7cb2d5cb77..8731dfcc82 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -21,7 +21,7 @@ The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]). - + diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index d8334d4eba..f72a24243e 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -24,7 +24,7 @@ - + diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml index 7a88a81a85..6ce515a600 100644 --- a/doc/classes/CameraTexture.xml +++ b/doc/classes/CameraTexture.xml @@ -18,7 +18,7 @@ Convenience property that gives access to the active property of the [CameraFeed]. - + Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component. diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index fa90bee0c3..6e0432c1d9 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -12,8 +12,8 @@ - - + + diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 500e220134..1e48a080d8 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -12,8 +12,8 @@ - - + + diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index f7d564aa0e..87ec56acba 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -35,7 +35,7 @@ If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible. - + diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index cc597264ca..1ae1a992c9 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -22,8 +22,8 @@ - - + + diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index 3997d7ae48..dc037fe858 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -39,7 +39,7 @@ The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code]. - + diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index a62a019e3e..c93704a5ab 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -49,7 +49,7 @@ The file system path in the address bar. - + If [code]true[/code], the [EditorFileDialog] will not warn the user before overwriting files. @@ -59,11 +59,11 @@ The purpose of the [EditorFileDialog], which defines the allowed behaviors. - + If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog]. - + diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 4bb2916478..75093cce13 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -19,7 +19,7 @@ - + diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index ec11936af5..5adbe61233 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -13,7 +13,7 @@ - + diff --git a/doc/classes/ExternalTexture.xml b/doc/classes/ExternalTexture.xml index 341391e32f..13ba6514ec 100644 --- a/doc/classes/ExternalTexture.xml +++ b/doc/classes/ExternalTexture.xml @@ -18,7 +18,7 @@ - + External texture size. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 162a5b2dcc..fc1f136ed1 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -63,7 +63,7 @@ The currently selected file path of the file dialog. - + The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. @@ -76,7 +76,7 @@ If [code]true[/code], the dialog will show hidden files. - + diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 84b704f5fd..fe3865fbdb 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -131,7 +131,7 @@ - + If [code]true[/code], the minimap is visible. @@ -141,7 +141,7 @@ The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle. - + If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end. diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index 5da81ad81f..7fcee7563a 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -17,7 +17,7 @@ The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its Control-derived children to accommodate the new layout. - + diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 3b0e08bc77..28e4621d5c 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -82,7 +82,7 @@ - + The storage quality for [constant STORAGE_COMPRESS_LOSSY]. diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 93314cdd7e..dd63ff0074 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -325,7 +325,7 @@ The size all icons will be adjusted to. If either X or Y component is not greater than zero, icon size won't be affected. - + The icon position, whether above or to the left of the text. See the [enum IconMode] constants. @@ -341,7 +341,7 @@ Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display. [b]Note:[/b] This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero. - + Whether all columns will have the same width. If [code]true[/code], the width is equal to the largest column width of all columns. diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 84056fd03c..4bff425d28 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -53,11 +53,11 @@ Limits the lines of text the node shows on screen. - + Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. - + The text to display on screen. diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml index af13a77dc8..3b5056aa05 100644 --- a/doc/classes/LargeTexture.xml +++ b/doc/classes/LargeTexture.xml @@ -69,7 +69,7 @@ - + diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 18879d163e..3c1a3ef02e 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -127,7 +127,7 @@ If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. - + Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter. @@ -142,7 +142,7 @@ # `text_change_rejected` is emitted with "bye" as parameter. [/codeblock] - + Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code]. diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index f70f221526..1ebbf76bb1 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -12,8 +12,8 @@ - - + + The button's text that will be displayed inside the button's area. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 2099c19368..bcaa9e9ff5 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -27,13 +27,13 @@ - - - + + + If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current [MenuButton] and open the other one. - + diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml index 250b679070..680c1f452c 100644 --- a/doc/classes/MeshTexture.xml +++ b/doc/classes/MeshTexture.xml @@ -14,7 +14,7 @@ Sets the base texture that the Mesh will use to draw. - + Sets the size of the image, needed for reference. diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index bb938cd0a4..17baa9a484 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -35,7 +35,7 @@ If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders. - + The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 6c8675c1e7..82e8934c46 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -163,12 +163,12 @@ - - + + The index of the currently selected item, or [code]-1[/code] if no item is selected. - + diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index 8b1667ae4f..857d7c858a 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -11,7 +11,7 @@ - + The base position offset for all [ParallaxLayer] children. diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml index 1bbd68c594..4fb9458a32 100644 --- a/doc/classes/Path2D.xml +++ b/doc/classes/Path2D.xml @@ -15,7 +15,7 @@ A [Curve2D] describing the path. - + diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index ab29ba83f6..c7422d4033 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -32,7 +32,7 @@ - + Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layer and collision_mask when modified. diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index 5723a2093e..ba4f910ab4 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -57,7 +57,7 @@ If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event. [b]Note:[/b] Enabling this property doesn't affect the Close or Cancel buttons' behavior in dialogs that inherit from this class. As a workaround, you can use [method WindowDialog.get_close_button] or [method ConfirmationDialog.get_cancel] and hide the buttons in question by setting their [member CanvasItem.visible] property to [code]false[/code]. - + diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 035be4a55b..bbabc03f63 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -459,7 +459,7 @@ If [code]true[/code], allows navigating [PopupMenu] with letter keys. - + If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected. diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 00ef4afcd3..4a5ef6104e 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -14,8 +14,8 @@ If [code]true[/code], the fill percentage is displayed on the bar. - - + + diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml index 43039a8931..223c002bac 100644 --- a/doc/classes/ProxyTexture.xml +++ b/doc/classes/ProxyTexture.xml @@ -11,7 +11,7 @@ - + diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 156b267609..8276d4feac 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -263,7 +263,7 @@ The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count]. - + If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line]. diff --git a/doc/classes/RoomManager.xml b/doc/classes/RoomManager.xml index 88a2da4851..432585037b 100644 --- a/doc/classes/RoomManager.xml +++ b/doc/classes/RoomManager.xml @@ -70,7 +70,7 @@ Portal culling normally operates using the current [Camera] / [Camera]s, however for debugging purposes within the editor, you can use this setting to override this behaviour and force it to use a particular camera to get a better idea of what the occlusion culling is doing. - + Optionally during conversion the potentially visible set (PVS) of rooms that are potentially visible from each room can be calculated. This can be used either to aid in dynamic portal culling, or to totally replace portal culling. In [code]Full[/code] PVS Mode, all objects within the potentially visible rooms will be frustum culled, and rendered if they are within the view frustum. diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index 347caa01b7..fd17e93f08 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -27,11 +27,11 @@ - - - - - + + + + + diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml index d7f0c8c613..2032fc976e 100644 --- a/doc/classes/ScrollBar.xml +++ b/doc/classes/ScrollBar.xml @@ -14,8 +14,8 @@ Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused. - - + + diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 0a6878e150..44f04e4d5b 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -35,7 +35,7 @@ If [code]true[/code], the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible. - + diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml index b92f136417..1434aedcb0 100644 --- a/doc/classes/Slider.xml +++ b/doc/classes/Slider.xml @@ -15,11 +15,11 @@ If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code. - + If [code]true[/code], the value can be changed using the mouse wheel. - + Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers. diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml index e761c68235..98e0c411ef 100644 --- a/doc/classes/StreamTexture.xml +++ b/doc/classes/StreamTexture.xml @@ -18,7 +18,7 @@ - + The StreamTexture's file path to a [code].stex[/code] file. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 47bb3ebf27..23435d37a2 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -479,7 +479,7 @@ If [code]true[/code], the "tab" character will have a visible representation. - + If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines. @@ -498,7 +498,7 @@ The width, in pixels, of the minimap. - + If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text. diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml index 95a0d64207..2350a27175 100644 --- a/doc/classes/Texture3D.xml +++ b/doc/classes/Texture3D.xml @@ -22,8 +22,8 @@ - - + + diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index e3358e777e..984c0c8116 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -27,7 +27,7 @@ The fill direction. See [enum FillMode] for possible values. - + If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member fill_mode], this setting will enable stretching. diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index 35fcd2ff31..7106815efe 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -22,7 +22,7 @@ If [code]true[/code], texture is flipped vertically. - + Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]. diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml index 47ce57dd60..0ac1aebdbd 100644 --- a/doc/classes/ToolButton.xml +++ b/doc/classes/ToolButton.xml @@ -15,7 +15,7 @@ - + diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index f84ca021ee..76b3be09d3 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -222,14 +222,14 @@ The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position. - + If [code]true[/code], the folding arrow is hidden. If [code]true[/code], the tree's root is hidden. - + Allows single or multiple selection. See the [enum SelectMode] constants. diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index b5296d5538..f43ceebf5a 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -11,8 +11,8 @@ - - + + diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 8dbc10e726..dde3c92feb 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -12,8 +12,8 @@ - - + + diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml index ed9b152347..053c9bd451 100644 --- a/doc/classes/VehicleBody.xml +++ b/doc/classes/VehicleBody.xml @@ -22,11 +22,11 @@ [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the vehicle reversing. - + The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel.use_as_steering] set to [code]true[/code] will automatically be rotated. - + diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml index 931fd06241..a3ba81135c 100644 --- a/doc/classes/ViewportTexture.xml +++ b/doc/classes/ViewportTexture.xml @@ -16,8 +16,8 @@ - - + + The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture. diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 62edefb692..3653d1610f 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -40,15 +40,15 @@ class TypeName: class PropertyDef: def __init__( - self, name, type_name, setter, getter, text, default_value, overridden - ): # type: (str, TypeName, Optional[str], Optional[str], Optional[str], Optional[str], Optional[bool]) -> None + self, name, type_name, setter, getter, text, default_value, overrides + ): # type: (str, TypeName, Optional[str], Optional[str], Optional[str], Optional[str], Optional[str]) -> None self.name = name self.type_name = type_name self.setter = setter self.getter = getter self.text = text self.default_value = default_value - self.overridden = overridden + self.overrides = overrides class ParameterDef: @@ -160,10 +160,10 @@ class State: default_value = property.get("default") or None if default_value is not None: default_value = "``{}``".format(default_value) - overridden = property.get("override") or False + overrides = property.get("overrides") or None property_def = PropertyDef( - property_name, type_name, setter, getter, property.text, default_value, overridden + property_name, type_name, setter, getter, property.text, default_value, overrides ) class_def.properties[property_name] = property_def @@ -462,8 +462,9 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S for property_def in class_def.properties.values(): type_rst = property_def.type_name.to_rst(state) default = property_def.default_value - if default is not None and property_def.overridden: - ml.append((type_rst, property_def.name, default + " *(parent override)*")) + if default is not None and property_def.overrides: + ref = ":ref:`{1}`".format(property_def.name, property_def.overrides) + ml.append((type_rst, property_def.name, default + " (overrides " + ref + ")")) else: ref = ":ref:`{0}`".format(property_def.name, class_name) ml.append((type_rst, ref, default)) @@ -550,12 +551,12 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write("\n\n") # Property descriptions - if any(not p.overridden for p in class_def.properties.values()) > 0: + if any(not p.overrides for p in class_def.properties.values()) > 0: f.write(make_heading("Property Descriptions", "-")) index = 0 for property_def in class_def.properties.values(): - if property_def.overridden: + if property_def.overrides: continue if index != 0: diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 0cd03bc721..316098a264 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -282,11 +282,17 @@ void DocData::generate(bool p_basic_types) { } PropertyDoc prop; - prop.name = E->get().name; - prop.overridden = inherited; + if (inherited) { + String parent = ClassDB::get_parent_class(c.name); + while (!ClassDB::has_property(parent, prop.name, true)) { + parent = ClassDB::get_parent_class(parent); + } + prop.overrides = parent; + } + bool default_value_valid = false; Variant default_value; @@ -1127,7 +1133,7 @@ Error DocData::save_classes(const String &p_default_path, const Map"); + _write_string(f, 2, ""); } else { _write_string(f, 2, ""); _write_string(f, 3, p.description.strip_edges().xml_escape()); diff --git a/editor/doc/doc_data.h b/editor/doc/doc_data.h index e227968e75..68a8d8755d 100644 --- a/editor/doc/doc_data.h +++ b/editor/doc/doc_data.h @@ -72,6 +72,7 @@ public: String setter, getter; String default_value; bool overridden; + String overrides; bool operator<(const PropertyDoc &p_prop) const { return name < p_prop.name; } diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 0757e571c1..bf52babaaa 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -507,19 +507,20 @@ void EditorHelp::_update_doc() { class_desc->add_newline(); class_desc->push_font(doc_code_font); class_desc->push_indent(1); - class_desc->push_table(2); + class_desc->push_table(3); class_desc->set_table_column_expand(1, true); for (int i = 0; i < cd.properties.size(); i++) { property_line[cd.properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description + // Property type. class_desc->push_cell(); class_desc->push_align(RichTextLabel::ALIGN_RIGHT); class_desc->push_font(doc_code_font); _add_type(cd.properties[i].type, cd.properties[i].enumeration); class_desc->pop(); class_desc->pop(); - class_desc->pop(); + class_desc->pop(); // cell bool describe = false; @@ -540,6 +541,7 @@ void EditorHelp::_update_doc() { describe = false; } + // Property name. class_desc->push_cell(); class_desc->push_font(doc_code_font); class_desc->push_color(headline_color); @@ -555,25 +557,41 @@ void EditorHelp::_update_doc() { property_descr = true; } + class_desc->pop(); + class_desc->pop(); + class_desc->pop(); // cell + + // Property value. + class_desc->push_cell(); + class_desc->push_font(doc_code_font); + if (cd.properties[i].default_value != "") { class_desc->push_color(symbol_color); - class_desc->add_text(cd.properties[i].overridden ? " [" + TTR("override:") + " " : " [" + TTR("default:") + " "); + if (cd.properties[i].overridden) { + class_desc->add_text(" ["); + class_desc->push_meta("@member " + cd.properties[i].overrides + "." + cd.properties[i].name); + _add_text(vformat(TTR("overrides %s:"), cd.properties[i].overrides)); + class_desc->pop(); + class_desc->add_text(" "); + } else { + class_desc->add_text(" [" + TTR("default:") + " "); + } class_desc->pop(); + class_desc->push_color(value_color); _add_text(_fix_constant(cd.properties[i].default_value)); class_desc->pop(); + class_desc->push_color(symbol_color); class_desc->add_text("]"); class_desc->pop(); } class_desc->pop(); - class_desc->pop(); - - class_desc->pop(); + class_desc->pop(); // cell } - class_desc->pop(); //table + class_desc->pop(); // table class_desc->pop(); class_desc->pop(); // font class_desc->add_newline(); diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml index bb6012890f..57ffc2e2cf 100644 --- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml +++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml @@ -127,14 +127,14 @@ Enable or disable certificate verification when [member use_dtls] [code]true[/code]. - + Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is [code]false[/code], clients won't be automatically notified of other peers and won't be able to send them packets through the server. Set the default channel to be used to transfer data. By default, this value is [code]-1[/code] which means that ENet will only use 2 channels: one for reliable packets, and one for unreliable packets. The channel [code]0[/code] is reserved and cannot be used. Setting this member to any value between [code]0[/code] and [member channel_count] (excluded) will force ENet to use that channel for sending data. See [member channel_count] for more information about ENet channels. - + When enabled, the client or server created by this peer, will use [PacketPeerDTLS] instead of raw UDP sockets for communicating with the remote peer. This will make the communication encrypted with DTLS at the cost of higher resource usage and potentially larger packet size. [b]Note:[/b] When creating a DTLS server, make sure you setup the key/certificate pair via [method set_dtls_key] and [method set_dtls_certificate]. For DTLS clients, have a look at the [member dtls_verify] option, and configure the certificate accordingly via [method set_dtls_certificate]. diff --git a/modules/gltf/doc_classes/PackedSceneGLTF.xml b/modules/gltf/doc_classes/PackedSceneGLTF.xml index 8728d63e18..f59e45ea3a 100644 --- a/modules/gltf/doc_classes/PackedSceneGLTF.xml +++ b/modules/gltf/doc_classes/PackedSceneGLTF.xml @@ -38,7 +38,7 @@ - + diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml index c92b0488ac..2eaacc6e56 100644 --- a/modules/opensimplex/doc_classes/NoiseTexture.xml +++ b/modules/opensimplex/doc_classes/NoiseTexture.xml @@ -24,7 +24,7 @@ Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer. - + Height of the generated texture. diff --git a/modules/webrtc/doc_classes/WebRTCMultiplayer.xml b/modules/webrtc/doc_classes/WebRTCMultiplayer.xml index e71823d8ea..b2ea076500 100644 --- a/modules/webrtc/doc_classes/WebRTCMultiplayer.xml +++ b/modules/webrtc/doc_classes/WebRTCMultiplayer.xml @@ -66,8 +66,8 @@ - - + + diff --git a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml index 42503125c9..55ef18a421 100644 --- a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml +++ b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml @@ -31,8 +31,8 @@ - - + +