diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/EditorInspectorPlugin.xml | 2 | ||||
-rw-r--r-- | doc/classes/Mesh.xml | 2 | ||||
-rw-r--r-- | doc/classes/MeshLibrary.xml | 2 | ||||
-rw-r--r-- | doc/classes/NavigationAgent2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/NavigationAgent3D.xml | 2 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 5 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 3 | ||||
-rwxr-xr-x | doc/tools/make_rst.py | 68 |
8 files changed, 58 insertions, 28 deletions
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index e5e6905cd2..4f6ef76c4c 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -78,9 +78,11 @@ <param index="0" name="property" type="String" /> <param index="1" name="editor" type="Control" /> <param index="2" name="add_to_end" type="bool" default="false" /> + <param index="3" name="label" type="String" default="""" /> <description> Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty]. There can be multiple property editors for a property. If [param add_to_end] is [code]true[/code], this newly added editor will be displayed after all the other editors of the property whose [param add_to_end] is [code]false[/code]. For example, the editor uses this parameter to add an "Edit Region" button for [member Sprite2D.region_rect] below the regular [Rect2] editor. + [param label] can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead. </description> </method> <method name="add_property_editor_for_multiple_properties"> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 966e870940..6b5a50d97b 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -4,7 +4,7 @@ A [Resource] that contains vertex array-based geometry. </brief_description> <description> - Mesh is a type of [Resource] that contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. + Mesh is a type of [Resource] that contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. The maximum number of surfaces per mesh is [constant RenderingServer.MAX_MESH_SURFACES]. </description> <tutorials> <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/2742</link> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index c5e8d8cbe7..f65e29af8e 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -29,7 +29,7 @@ <return type="int" /> <param index="0" name="name" type="String" /> <description> - Returns the first item with the given name. + Returns the first item with the given name, or [code]-1[/code] if no item is found. </description> </method> <method name="get_item_list" qualifiers="const"> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 6f0561e66e..94c372106b 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -261,7 +261,7 @@ <signal name="velocity_computed"> <param index="0" name="safe_velocity" type="Vector2" /> <description> - Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true. + Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is [code]true[/code] and the agent has a navigation map. </description> </signal> <signal name="waypoint_reached"> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index 64ee35a84b..5f9f4991d1 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -271,7 +271,7 @@ <signal name="velocity_computed"> <param index="0" name="safe_velocity" type="Vector3" /> <description> - Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true. + Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is [code]true[/code] and the agent has a navigation map. </description> </signal> <signal name="waypoint_reached"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 5ac4c96d93..32e71ce030 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -902,8 +902,9 @@ <member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1"> Sets the V-Sync mode for the main game window. The editor's own V-Sync mode can be set using [member EditorSettings.interface/editor/vsync_mode]. See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. - Depending on the platform and used renderer, the engine will fall back to [b]Enabled[/b] if the desired mode is not supported. - [b]Note:[/b] V-Sync modes other than [b]Enabled[/b] are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + Depending on the platform and rendering method, the engine will fall back to [b]Enabled[/b] if the desired mode is not supported. + V-Sync can be disabled on the command line using the [code]--disable-vsync[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. + [b]Note:[/b] The [b]Adaptive[/b] and [b]Mailbox[/b] V-Sync modes are only supported in the Forward+ and Mobile rendering methods, not Compatibility. [b]Note:[/b] This property is only read when the project starts. To change the V-Sync mode at runtime, call [method DisplayServer.window_set_vsync_mode] instead. </member> <member name="dotnet/project/assembly_name" type="String" setter="" getter="" default=""""> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 3ddc0d8f7b..3c9f0fc7af 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -4239,6 +4239,9 @@ <constant name="MAX_2D_DIRECTIONAL_LIGHTS" value="8"> The maximum number of directional lights that can be rendered at a given time in 2D. </constant> + <constant name="MAX_MESH_SURFACES" value="256"> + The maximum number of surfaces a mesh can have. + </constant> <constant name="TEXTURE_LAYERED_2D_ARRAY" value="0" enum="TextureLayeredType"> Array of 2-dimensional textures (see [Texture2DArray]). </constant> diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index bc379f8553..761a7f8f4a 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -1110,11 +1110,13 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create signal signature and anchor point. - f.write(f".. _class_{class_name}_signal_{signal.name}:\n\n") + signal_anchor = f"class_{class_name}_signal_{signal.name}" + f.write(f".. _{signal_anchor}:\n\n") + self_link = f":ref:`🔗<{signal_anchor}>`" f.write(".. rst-class:: classref-signal\n\n") _, signature = make_method_signature(class_def, signal, "", state) - f.write(f"{signature}\n\n") + f.write(f"{signature} {self_link}\n\n") # Add signal description, or a call to action if it's missing. @@ -1147,13 +1149,15 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create enumeration signature and anchor point. - f.write(f".. _enum_{class_name}_{e.name}:\n\n") + enum_anchor = f"enum_{class_name}_{e.name}" + f.write(f".. _{enum_anchor}:\n\n") + self_link = f":ref:`🔗<{enum_anchor}>`" f.write(".. rst-class:: classref-enumeration\n\n") if e.is_bitfield: - f.write(f"flags **{e.name}**:\n\n") + f.write(f"flags **{e.name}**: {self_link}\n\n") else: - f.write(f"enum **{e.name}**:\n\n") + f.write(f"enum **{e.name}**: {self_link}\n\n") for value in e.values.values(): # Also create signature and anchor point for each enum constant. @@ -1191,10 +1195,12 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: for constant in class_def.constants.values(): # Create constant signature and anchor point. - f.write(f".. _class_{class_name}_constant_{constant.name}:\n\n") + constant_anchor = f"class_{class_name}_constant_{constant.name}" + f.write(f".. _{constant_anchor}:\n\n") + self_link = f":ref:`🔗<{constant_anchor}>`" f.write(".. rst-class:: classref-constant\n\n") - f.write(f"**{constant.name}** = ``{constant.value}``\n\n") + f.write(f"**{constant.name}** = ``{constant.value}`` {self_link}\n\n") # Add constant description. @@ -1227,13 +1233,16 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create annotation signature and anchor point. + self_link = "" if i == 0: - f.write(f".. _class_{class_name}_annotation_{m.name}:\n\n") + annotation_anchor = f"class_{class_name}_annotation_{m.name}" + f.write(f".. _{annotation_anchor}:\n\n") + self_link = f" :ref:`🔗<{annotation_anchor}>`" f.write(".. rst-class:: classref-annotation\n\n") _, signature = make_method_signature(class_def, m, "", state) - f.write(f"{signature}\n\n") + f.write(f"{signature}{self_link}\n\n") # Add annotation description, or a call to action if it's missing. @@ -1267,13 +1276,17 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create property signature and anchor point. - f.write(f".. _class_{class_name}_property_{property_def.name}:\n\n") + property_anchor = f"class_{class_name}_property_{property_def.name}" + f.write(f".. _{property_anchor}:\n\n") + self_link = f":ref:`🔗<{property_anchor}>`" f.write(".. rst-class:: classref-property\n\n") property_default = "" if property_def.default_value is not None: property_default = f" = {property_def.default_value}" - f.write(f"{property_def.type_name.to_rst(state)} **{property_def.name}**{property_default}\n\n") + f.write( + f"{property_def.type_name.to_rst(state)} **{property_def.name}**{property_default} {self_link}\n\n" + ) # Create property setter and getter records. @@ -1327,13 +1340,16 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create constructor signature and anchor point. + self_link = "" if i == 0: - f.write(f".. _class_{class_name}_constructor_{m.name}:\n\n") + constructor_anchor = f"class_{class_name}_constructor_{m.name}" + f.write(f".. _{constructor_anchor}:\n\n") + self_link = f" :ref:`🔗<{constructor_anchor}>`" f.write(".. rst-class:: classref-constructor\n\n") ret_type, signature = make_method_signature(class_def, m, "", state) - f.write(f"{ret_type} {signature}\n\n") + f.write(f"{ret_type} {signature}{self_link}\n\n") # Add constructor description, or a call to action if it's missing. @@ -1366,17 +1382,21 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create method signature and anchor point. + self_link = "" + if i == 0: method_qualifier = "" if m.name.startswith("_"): method_qualifier = "private_" - - f.write(f".. _class_{class_name}_{method_qualifier}method_{m.name}:\n\n") + method_anchor = f"class_{class_name}_{method_qualifier}method_{m.name}" + f.write(f".. _{method_anchor}:\n\n") + self_link = f" :ref:`🔗<{method_anchor}>`" f.write(".. rst-class:: classref-method\n\n") ret_type, signature = make_method_signature(class_def, m, "", state) - f.write(f"{ret_type} {signature}\n\n") + + f.write(f"{ret_type} {signature}{self_link}\n\n") # Add method description, or a call to action if it's missing. @@ -1409,16 +1429,16 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create operator signature and anchor point. - operator_anchor = f".. _class_{class_name}_operator_{sanitize_operator_name(m.name, state)}" + operator_anchor = f"class_{class_name}_operator_{sanitize_operator_name(m.name, state)}" for parameter in m.parameters: operator_anchor += f"_{parameter.type_name.type_name}" - operator_anchor += ":\n\n" - f.write(operator_anchor) + f.write(f".. _{operator_anchor}:\n\n") + self_link = f":ref:`🔗<{operator_anchor}>`" f.write(".. rst-class:: classref-operator\n\n") ret_type, signature = make_method_signature(class_def, m, "", state) - f.write(f"{ret_type} {signature}\n\n") + f.write(f"{ret_type} {signature} {self_link}\n\n") # Add operator description, or a call to action if it's missing. @@ -1451,13 +1471,17 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Create theme property signature and anchor point. - f.write(f".. _class_{class_name}_theme_{theme_item_def.data_name}_{theme_item_def.name}:\n\n") + theme_item_anchor = f"class_{class_name}_theme_{theme_item_def.data_name}_{theme_item_def.name}" + f.write(f".. _{theme_item_anchor}:\n\n") + self_link = f":ref:`🔗<{theme_item_anchor}>`" f.write(".. rst-class:: classref-themeproperty\n\n") theme_item_default = "" if theme_item_def.default_value is not None: theme_item_default = f" = {theme_item_def.default_value}" - f.write(f"{theme_item_def.type_name.to_rst(state)} **{theme_item_def.name}**{theme_item_default}\n\n") + f.write( + f"{theme_item_def.type_name.to_rst(state)} **{theme_item_def.name}**{theme_item_default} {self_link}\n\n" + ) # Add theme property description, or a call to action if it's missing. |