From 1a001ad964c65bf4a89f28d3f4a779167d821296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 4 Dec 2020 15:54:48 +0100 Subject: doc: Sync classref with current source And fixups: - Add missing bindings in RenderingServer - Remove duplicate ArrayMesh enum bindings (they're in Mesh already) - Remove redundant _unhandled_key_input binding in Control (it's in Node already) --- doc/classes/ArrayMesh.xml | 76 ++------------- doc/classes/Color.xml | 8 ++ doc/classes/LightOccluder2D.xml | 2 + doc/classes/LinkButton.xml | 1 + doc/classes/MenuButton.xml | 1 + doc/classes/Mesh.xml | 123 +++++++++++++++--------- doc/classes/MeshDataTool.xml | 4 +- doc/classes/PhysicalBone3D.xml | 3 - doc/classes/ProjectSettings.xml | 4 + doc/classes/Quat.xml | 8 ++ doc/classes/RenderingServer.xml | 121 ++++++++++++------------ doc/classes/RichTextLabel.xml | 3 - doc/classes/SurfaceTool.xml | 204 ++++++++++++++++++++++++++-------------- doc/classes/TextServer.xml | 2 +- doc/classes/VehicleBody3D.xml | 1 - doc/classes/Viewport.xml | 22 +++++ 16 files changed, 326 insertions(+), 257 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index dc834474ad..3f9083ed6e 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -16,8 +16,8 @@ # Initialize the ArrayMesh. var arr_mesh = ArrayMesh.new() var arrays = [] - arrays.resize(ArrayMesh.ARRAY_MAX) - arrays[ArrayMesh.ARRAY_VERTEX] = vertices + arrays.resize(Mesh.ARRAY_MAX) + arrays[Mesh.ARRAY_VERTEX] = vertices # Create the Mesh. arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) @@ -33,8 +33,8 @@ // Initialize the ArrayMesh. var arrMesh = new ArrayMesh(); var arrays = new Godot.Collections.Array(); - arrays.Resize((int)ArrayMesh.ArrayType.Max); - arrays[(int)ArrayMesh.ArrayType.Vertex] = vertices; + arrays.Resize((int)Mesh.ArrayType.Max); + arrays[(int)Mesh.ArrayType.Vertex] = vertices; // Create the Mesh. arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays); @@ -71,12 +71,12 @@ - + Creates a new surface. Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. - The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used. + The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices. @@ -217,69 +217,5 @@ - - Default value used for index_array_len when no indices are present. - - - Amount of weights/bone indices per vertex (always 4). - - - [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions. - - - [PackedVector3Array] of vertex normals. - - - [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. - - - [PackedColorArray] of vertex colors. - - - [PackedVector2Array] for UV coordinates. - - - [PackedVector2Array] for second UV coordinates. - - - [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats. - - - [PackedFloat32Array] of bone weights. Each element in groups of 4 floats. - - - [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. - For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. - - - Represents the size of the [enum ArrayType] enum. - - - Array format will include vertices (mandatory). - - - Array format will include normals. - - - Array format will include tangents. - - - Array format will include a color array. - - - Array format will include UVs. - - - Array format will include another set of UVs. - - - Array format will include bone indices. - - - Array format will include bone weights. - - - Index array will be used. - diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 9705a196ed..89c5e355ec 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -255,6 +255,14 @@ + + + + + + + + diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml index 9f128e5942..45925dee96 100644 --- a/doc/classes/LightOccluder2D.xml +++ b/doc/classes/LightOccluder2D.xml @@ -18,6 +18,8 @@ The [OccluderPolygon2D] used to compute the shadow. + + diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 4b8ab3a6cf..93384843de 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -39,6 +39,7 @@ + Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index ac371d1e7b..a002ce636b 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -31,6 +31,7 @@ + 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/Mesh.xml b/doc/classes/Mesh.xml index 78db09feee..e6643ef578 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -132,6 +132,62 @@ Blend shapes are relative to base weight. + + Array of vertices. + + + Array of normals. + + + Array of tangents as an array of floats, 4 floats per tangent. + + + Array of colors. + + + Array of UV coordinates. + + + Array of second set of UV coordinates. + + + + + + + + + + + Array of bone data. + + + Array of weights. + + + Array of indices. + + + Represents the size of the [enum ArrayType] enum. + + + + + + + + + + + + + + + + + + + Mesh array contains vertices. All meshes require a vertex array so this should always be present. @@ -150,68 +206,45 @@ Mesh array contains second UV. - - Mesh array contains bones. + - - Mesh array contains bone weights. + - - Mesh array uses indices. + - - Flag used to mark a compressed (half float) normal array. + - - Flag used to mark a compressed (half float) tangent array. + + Mesh array contains bones. - - Flag used to mark a compressed (half float) color array. + + Mesh array contains bone weights. - - Flag used to mark a compressed (half float) UV coordinates array. + + Mesh array uses indices. - - Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. + - - Flag used to mark a compressed index array. + - - Flag used to mark that the array contains 2D vertices. + - - Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. + - - Array of vertices. + - - Array of normals. + - - Array of tangents as an array of floats, 4 floats per tangent. - - - Array of colors. - - - Array of UV coordinates. + - - Array of second set of UV coordinates. - - - Array of bone data. + - - Array of weights. + + Flag used to mark that the array contains 2D vertices. - - Array of indices. + - - Represents the size of the [enum ArrayType] enum. + diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index e107b1a108..d4157dd4c9 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -169,8 +169,8 @@ - Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant ArrayMesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant ArrayMesh.ARRAY_FORMAT_NORMAL] is [code]2[/code]. - See [enum ArrayMesh.ArrayFormat] for a list of format flags. + Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant Mesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant Mesh.ARRAY_FORMAT_NORMAL] is [code]2[/code]. + See [enum Mesh.ArrayFormat] for a list of format flags. diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 0808e4a724..dcf24c1d32 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -117,9 +117,6 @@ The body's mass. - - The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b]. - diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index fa4ce9bc6d..eab06f633c 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1084,6 +1084,10 @@ + + + + diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 5932a624f2..00ad4ee934 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -218,6 +218,14 @@ + + + + + + + + diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 77a80cb8b6..f36713a81a 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -537,17 +537,6 @@ Sets the shape of the occluder polygon. - - - - - - - - - Sets the shape of the occluder polygon as lines. - - @@ -1625,25 +1614,6 @@ Sets a shader material's shader. - - - - - - - - - - - - - - - - - - @@ -1742,32 +1712,46 @@ Returns a mesh's surface's arrays for blend shapes. - + - + + + + + + + + + - + - + - Function is unused in Godot 3.x. - + - + + + + + + + + + - + - Function is unused in Godot 3.x. @@ -3084,16 +3068,24 @@ Array is an UV coordinates array for the second UV coordinates. - + + + + + + + + + Array contains bone information. - + Array is weight information. - + Array is index array. - + Represents the size of the [enum ArrayType] enum. @@ -3114,40 +3106,45 @@ Flag used to mark an UV coordinates array for the second UV coordinates. - + + + + + + + + + Flag used to mark a bone information array. - + Flag used to mark a weights array. - + Flag used to mark an index array. - - Flag used to mark a compressed (half float) normal array. + + + - - Flag used to mark a compressed (half float) tangent array. + - - Flag used to mark a compressed (half float) color array. + - - Flag used to mark a compressed (half float) UV coordinates array. + - - Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. + - - Flag used to mark a compressed index array. + - - Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. + - + Flag used to mark that the array contains 2D vertices. - + + + Primitive to draw consists of points. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 4faff95fd3..faf0d97766 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -329,9 +329,6 @@ The raw text of the label. When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]. - - Base text writing direction. - The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed. diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 4f02cd00dd..82ffe86251 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -8,11 +8,11 @@ [codeblock] var st = SurfaceTool.new() st.begin(Mesh.PRIMITIVE_TRIANGLES) - st.add_color(Color(1, 0, 0)) - st.add_uv(Vector2(0, 0)) - st.add_vertex(Vector3(0, 0, 0)) + st.set_color(Color(1, 0, 0)) + st.set_uv(Vector2(0, 0)) + st.set_vertex(Vector3(0, 0, 0)) [/codeblock] - The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method add_uv] or [method add_color], then the last values would be used. + The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method set_uv] or [method set_color], then the last values would be used. Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh. Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. See also [ArrayMesh], [ImmediateGeometry3D] and [MeshDataTool] for procedural geometry generation. @@ -22,25 +22,6 @@ https://godotengine.org/asset-library/asset/676 - - - - - - - Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. - - - - - - - - - Specifies a [Color] for the next vertex to use. - [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible. - - @@ -50,15 +31,6 @@ Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices. - - - - - - - Specifies a normal for the next vertex to use. - - @@ -68,15 +40,6 @@ Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation. - - - - - - - Specifies a tangent for the next vertex to use. - - @@ -97,24 +60,6 @@ Requires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES]. - - - - - - - Specifies a set of UV coordinates to use for the next vertex. - - - - - - - - - Specifies an optional second set of UV coordinates to use for the next vertex. - - @@ -124,15 +69,6 @@ Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV). - - - - - - - Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. - - @@ -167,11 +103,11 @@ - + Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. - Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags. + [b]FIXME:[/b] Document possible values for [code]flags[/code], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat]. @@ -229,6 +165,20 @@ Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already. + + + + + + + + + + + + + + @@ -236,6 +186,45 @@ Shrinks the vertex array by creating an index array (avoids reusing vertices). + + + + + + + Specifies an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. + + + + + + + + + Specifies a [Color] for the next vertex to use. + [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible. + + + + + + + + + + + + + + + + + + + + + + @@ -245,7 +234,82 @@ Sets [Material] to be used by the [Mesh] you are constructing. + + + + + + + Specifies a normal for the next vertex to use. + + + + + + + + + + + + + + + + + Specifies a tangent for the next vertex to use. + + + + + + + + + Specifies a set of UV coordinates to use for the next vertex. + + + + + + + + + Specifies an optional second set of UV coordinates to use for the next vertex. + + + + + + + + + Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 43388bb7f1..9c34c63e2f 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -1160,7 +1160,7 @@ TextServer supports loading system fonts. - + TextServer require external data file for some features. diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml index 1125a1da94..90d0591949 100644 --- a/doc/classes/VehicleBody3D.xml +++ b/doc/classes/VehicleBody3D.xml @@ -26,7 +26,6 @@ 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 VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated. - diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 85dc5e8fd8..e2cf848f45 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -234,6 +234,10 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. + + + + The subdivision amount of the first quadrant on the shadow atlas. @@ -428,5 +432,23 @@ Max value for [enum DefaultCanvasItemTextureRepeat] enum. + + + + + + + + + + + + + + + + + + -- cgit v1.2.3