From d567c15aed0a51d939c76305fdf56cc3732bbef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 24 Apr 2020 17:43:10 +0200 Subject: doc: Fix parsing typed arrays in makerst.py `Type[]` typed arrays will link to `Type`, as it's likely the most interesting information for the user. And sync classref with current source. --- doc/classes/@GlobalScope.xml | 3 ++ doc/classes/Area2D.xml | 4 +-- doc/classes/Area3D.xml | 4 +-- doc/classes/EditorSelection.xml | 2 +- doc/classes/Node.xml | 2 +- doc/classes/PhysicsBody2D.xml | 2 +- doc/classes/PhysicsBody3D.xml | 2 +- doc/classes/ProjectSettings.xml | 12 ++++++++ doc/classes/RDPipelineColorBlendState.xml | 34 ++-------------------- .../RDPipelineColorBlendStateAttachment.xml | 6 ++++ doc/classes/RDPipelineMultisampleState.xml | 22 ++------------ doc/classes/RDVertexAttribute.xml | 25 ++++++++++++++++ doc/classes/RDVertexDescription.xml | 25 ---------------- doc/classes/RenderingDevice.xml | 10 +++---- doc/classes/RigidBody2D.xml | 2 +- doc/classes/Skeleton3D.xml | 2 +- doc/classes/TileMap.xml | 4 +-- doc/tools/makerst.py | 13 +++++---- 18 files changed, 75 insertions(+), 99 deletions(-) create mode 100644 doc/classes/RDVertexAttribute.xml delete mode 100644 doc/classes/RDVertexDescription.xml diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 71bbc271e2..602d0e4d0e 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -21,6 +21,9 @@ The [ClassDB] singleton. + + The [DisplayServer] singleton. + The [Engine] singleton. diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 0c1317f19d..4190cbe6b9 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -29,14 +29,14 @@ - + Returns a list of intersecting [Area2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. - + Returns a list of intersecting [PhysicsBody2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index 1adfc878e2..a94cecd879 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -28,14 +28,14 @@ - + Returns a list of intersecting [Area3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. - + Returns a list of intersecting [PhysicsBody3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index 6cada84455..1ff9744b70 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -27,7 +27,7 @@ - + Gets the list of selected nodes. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 8c588f0373..1c745de7f0 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -221,7 +221,7 @@ - + Returns an array of references to node's children. diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 28d6ce7048..6afbd1ee8e 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -20,7 +20,7 @@ - + Returns an array of nodes that were added as collision exceptions for this body. diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index f0ba2a7f5f..2301a07a5c 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -20,7 +20,7 @@ - + Returns an array of nodes that were added as collision exceptions for this body. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 4eb089e511..feded45c27 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -806,6 +806,18 @@ This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. + + + + + + + + + + + + Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. diff --git a/doc/classes/RDPipelineColorBlendState.xml b/doc/classes/RDPipelineColorBlendState.xml index 7cb31f6986..adc6f1f6a3 100644 --- a/doc/classes/RDPipelineColorBlendState.xml +++ b/doc/classes/RDPipelineColorBlendState.xml @@ -7,40 +7,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml index a4caa622aa..7f118b5f0b 100644 --- a/doc/classes/RDPipelineColorBlendStateAttachment.xml +++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml @@ -7,6 +7,12 @@ + + + + + + diff --git a/doc/classes/RDPipelineMultisampleState.xml b/doc/classes/RDPipelineMultisampleState.xml index b936ded4fe..4658c7d9ba 100644 --- a/doc/classes/RDPipelineMultisampleState.xml +++ b/doc/classes/RDPipelineMultisampleState.xml @@ -7,26 +7,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -39,6 +19,8 @@ + + diff --git a/doc/classes/RDVertexAttribute.xml b/doc/classes/RDVertexAttribute.xml new file mode 100644 index 0000000000..56fe40b51d --- /dev/null +++ b/doc/classes/RDVertexAttribute.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RDVertexDescription.xml b/doc/classes/RDVertexDescription.xml deleted file mode 100644 index 90e37ee023..0000000000 --- a/doc/classes/RDVertexDescription.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 6d68eafc70..8a44d213e8 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -296,7 +296,7 @@ - + @@ -386,9 +386,9 @@ - + - + @@ -576,7 +576,7 @@ - + @@ -712,7 +712,7 @@ - + diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index e746d7fc96..8379fc5b58 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -81,7 +81,7 @@ - + Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code]. diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 08404fb467..4460b519fc 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -157,7 +157,7 @@ - + diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 5b7694b775..bfe6983f06 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -74,14 +74,14 @@ - + Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]). - + diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index c6c6cae6c0..5ceab52523 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -973,11 +973,14 @@ def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterabl f.write("\n") -def make_type(t, state): # type: (str, State) -> str - if t in state.classes: - return ":ref:`{0}`".format(t) - print_error("Unresolved type '{}', file: {}".format(t, state.current_class), state) - return t +def make_type(klass, state): # type: (str, State) -> str + link_type = klass + if link_type.endswith("[]"): # Typed array, strip [] to link to contained type. + link_type = link_type[:-2] + if link_type in state.classes: + return ":ref:`{}`".format(klass, link_type) + print_error("Unresolved type '{}', file: {}".format(klass, state.current_class), state) + return klass def make_enum(t, state): # type: (str, State) -> str -- cgit v1.2.3