Skip to content

Commit c9667d9

Browse files
authored
Merge pull request #9823 from godotengine/classref/sync-e3550cb
classref: Sync with current master branch (e3550cb)
2 parents d56905c + e0628f0 commit c9667d9

29 files changed

+1082
-141
lines changed

classes/[email protected]

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,9 @@ Returns a single character (as a :ref:`String<class_String>`) of the given Unico
899899

900900
::
901901

902-
a = char(65) # a is "A"
903-
a = char(65 + 32) # a is "a"
904-
a = char(8364) # a is "€"
902+
var upper = char(65) # upper is "A"
903+
var lower = char(65 + 32) # lower is "a"
904+
var euro = char(8364) # euro is "€"
905905

906906
.. rst-class:: classref-item-separator
907907

@@ -1047,10 +1047,10 @@ Returns the length of the given Variant ``var``. The length can be the character
10471047

10481048
::
10491049

1050-
a = [1, 2, 3, 4]
1050+
var a = [1, 2, 3, 4]
10511051
len(a) # Returns 4
10521052
1053-
b = "Hello!"
1053+
var b = "Hello!"
10541054
len(b) # Returns 6
10551055

10561056
.. rst-class:: classref-item-separator

classes/class_aabb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Methods
103103
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
104104
| :ref:`float<class_float>` | :ref:`get_shortest_axis_size<class_AABB_method_get_shortest_axis_size>`\ (\ ) |const| |
105105
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
106-
| :ref:`Vector3<class_Vector3>` | :ref:`get_support<class_AABB_method_get_support>`\ (\ dir\: :ref:`Vector3<class_Vector3>`\ ) |const| |
106+
| :ref:`Vector3<class_Vector3>` | :ref:`get_support<class_AABB_method_get_support>`\ (\ direction\: :ref:`Vector3<class_Vector3>`\ ) |const| |
107107
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
108108
| :ref:`float<class_float>` | :ref:`get_volume<class_AABB_method_get_volume>`\ (\ ) |const| |
109109
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -502,7 +502,7 @@ For an example, see :ref:`get_shortest_axis<class_AABB_method_get_shortest_axis>
502502

503503
.. rst-class:: classref-method
504504

505-
:ref:`Vector3<class_Vector3>` **get_support**\ (\ dir\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_AABB_method_get_support>`
505+
:ref:`Vector3<class_Vector3>` **get_support**\ (\ direction\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_AABB_method_get_support>`
506506

507507
Returns the vertex's position of this bounding box that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms.
508508

classes/class_boneattachment3d.rst

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,19 @@ Methods
4848
.. table::
4949
:widths: auto
5050

51-
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
52-
| :ref:`NodePath<class_NodePath>` | :ref:`get_external_skeleton<class_BoneAttachment3D_method_get_external_skeleton>`\ (\ ) |const| |
53-
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
54-
| :ref:`bool<class_bool>` | :ref:`get_use_external_skeleton<class_BoneAttachment3D_method_get_use_external_skeleton>`\ (\ ) |const| |
55-
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
56-
| |void| | :ref:`on_skeleton_update<class_BoneAttachment3D_method_on_skeleton_update>`\ (\ ) |
57-
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
58-
| |void| | :ref:`set_external_skeleton<class_BoneAttachment3D_method_set_external_skeleton>`\ (\ external_skeleton\: :ref:`NodePath<class_NodePath>`\ ) |
59-
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
60-
| |void| | :ref:`set_use_external_skeleton<class_BoneAttachment3D_method_set_use_external_skeleton>`\ (\ use_external_skeleton\: :ref:`bool<class_bool>`\ ) |
61-
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
51+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
52+
| :ref:`NodePath<class_NodePath>` | :ref:`get_external_skeleton<class_BoneAttachment3D_method_get_external_skeleton>`\ (\ ) |const| |
53+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
54+
| :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_skeleton<class_BoneAttachment3D_method_get_skeleton>`\ (\ ) |
55+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
56+
| :ref:`bool<class_bool>` | :ref:`get_use_external_skeleton<class_BoneAttachment3D_method_get_use_external_skeleton>`\ (\ ) |const| |
57+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
58+
| |void| | :ref:`on_skeleton_update<class_BoneAttachment3D_method_on_skeleton_update>`\ (\ ) |
59+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
60+
| |void| | :ref:`set_external_skeleton<class_BoneAttachment3D_method_set_external_skeleton>`\ (\ external_skeleton\: :ref:`NodePath<class_NodePath>`\ ) |
61+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
62+
| |void| | :ref:`set_use_external_skeleton<class_BoneAttachment3D_method_set_use_external_skeleton>`\ (\ use_external_skeleton\: :ref:`bool<class_bool>`\ ) |
63+
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
6264

6365
.. rst-class:: classref-section-separator
6466

@@ -139,6 +141,18 @@ Returns the :ref:`NodePath<class_NodePath>` to the external :ref:`Skeleton3D<cla
139141

140142
----
141143

144+
.. _class_BoneAttachment3D_method_get_skeleton:
145+
146+
.. rst-class:: classref-method
147+
148+
:ref:`Skeleton3D<class_Skeleton3D>` **get_skeleton**\ (\ ) :ref:`🔗<class_BoneAttachment3D_method_get_skeleton>`
149+
150+
Get parent or external :ref:`Skeleton3D<class_Skeleton3D>` node if found.
151+
152+
.. rst-class:: classref-item-separator
153+
154+
----
155+
142156
.. _class_BoneAttachment3D_method_get_use_external_skeleton:
143157

144158
.. rst-class:: classref-method

classes/class_csgshape3d.rst

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ Description
2323

2424
This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.
2525

26-
\ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D<class_MeshInstance3D>` with a :ref:`PrimitiveMesh<class_PrimitiveMesh>`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
26+
\ **Performance:** CSG nodes are only intended for prototyping as they have a significant CPU performance cost.
27+
28+
Consider baking final CSG operation results into static geometry that replaces the CSG nodes.
29+
30+
Individual CSG root node results can be baked to nodes with static resources with the editor menu that appears when a CSG root node is selected.
31+
32+
Individual CSG root nodes can also be baked to static resources with scripts by calling :ref:`bake_static_mesh<class_CSGShape3D_method_bake_static_mesh>` for the visual mesh or :ref:`bake_collision_shape<class_CSGShape3D_method_bake_collision_shape>` for the physics collision.
33+
34+
Entire scenes of CSG nodes can be baked to static geometry and exported with the editor gltf scene exporter.
2735

2836
.. rst-class:: classref-introduction-group
2937

@@ -64,19 +72,23 @@ Methods
6472
.. table::
6573
:widths: auto
6674

67-
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
68-
| :ref:`bool<class_bool>` | :ref:`get_collision_layer_value<class_CSGShape3D_method_get_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
69-
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
70-
| :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_CSGShape3D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
71-
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
72-
| :ref:`Array<class_Array>` | :ref:`get_meshes<class_CSGShape3D_method_get_meshes>`\ (\ ) |const| |
73-
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
74-
| :ref:`bool<class_bool>` | :ref:`is_root_shape<class_CSGShape3D_method_is_root_shape>`\ (\ ) |const| |
75-
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
76-
| |void| | :ref:`set_collision_layer_value<class_CSGShape3D_method_set_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
77-
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
78-
| |void| | :ref:`set_collision_mask_value<class_CSGShape3D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
79-
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
75+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
76+
| :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` | :ref:`bake_collision_shape<class_CSGShape3D_method_bake_collision_shape>`\ (\ ) |
77+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
78+
| :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`bake_static_mesh<class_CSGShape3D_method_bake_static_mesh>`\ (\ ) |
79+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
80+
| :ref:`bool<class_bool>` | :ref:`get_collision_layer_value<class_CSGShape3D_method_get_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
81+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
82+
| :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_CSGShape3D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
83+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
84+
| :ref:`Array<class_Array>` | :ref:`get_meshes<class_CSGShape3D_method_get_meshes>`\ (\ ) |const| |
85+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
86+
| :ref:`bool<class_bool>` | :ref:`is_root_shape<class_CSGShape3D_method_is_root_shape>`\ (\ ) |const| |
87+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
88+
| |void| | :ref:`set_collision_layer_value<class_CSGShape3D_method_set_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
89+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
90+
| |void| | :ref:`set_collision_mask_value<class_CSGShape3D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
91+
+-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
8092

8193
.. rst-class:: classref-section-separator
8294

@@ -254,6 +266,32 @@ Adds a collision shape to the physics engine for our CSG shape. This will always
254266
Method Descriptions
255267
-------------------
256268

269+
.. _class_CSGShape3D_method_bake_collision_shape:
270+
271+
.. rst-class:: classref-method
272+
273+
:ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` **bake_collision_shape**\ (\ ) :ref:`🔗<class_CSGShape3D_method_bake_collision_shape>`
274+
275+
Returns a baked physics :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` of this node's CSG operation result. Returns an empty shape if the node is not a CSG root node or has no valid geometry.
276+
277+
\ **Performance:** If the CSG operation results in a very detailed geometry with many faces physics performance will be very slow. Concave shapes should in general only be used for static level geometry and not with dynamic objects that are moving.
278+
279+
.. rst-class:: classref-item-separator
280+
281+
----
282+
283+
.. _class_CSGShape3D_method_bake_static_mesh:
284+
285+
.. rst-class:: classref-method
286+
287+
:ref:`ArrayMesh<class_ArrayMesh>` **bake_static_mesh**\ (\ ) :ref:`🔗<class_CSGShape3D_method_bake_static_mesh>`
288+
289+
Returns a baked static :ref:`ArrayMesh<class_ArrayMesh>` of this node's CSG operation result. Materials from involved CSG nodes are added as extra mesh surfaces. Returns an empty mesh if the node is not a CSG root node or has no valid geometry.
290+
291+
.. rst-class:: classref-item-separator
292+
293+
----
294+
257295
.. _class_CSGShape3D_method_get_collision_layer_value:
258296

259297
.. rst-class:: classref-method

classes/class_curve2d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx
265265

266266
:ref:`Vector2<class_Vector2>` **sample**\ (\ idx\: :ref:`int<class_int>`, t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Curve2D_method_sample>`
267267

268-
Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results.
268+
Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 <= t <= 1.0``) give strange, but predictable results.
269269

270270
If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t`` is ignored. If the curve has no points, the function sends an error to the console, and returns ``(0, 0)``.
271271

classes/class_editorsyntaxhighlighter.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ EditorSyntaxHighlighter
1212

1313
**Inherits:** :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
1414

15+
**Inherited By:** :ref:`GDScriptSyntaxHighlighter<class_GDScriptSyntaxHighlighter>`
16+
1517
Base class for :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` used by the :ref:`ScriptEditor<class_ScriptEditor>`.
1618

1719
.. rst-class:: classref-introduction-group

0 commit comments

Comments
 (0)