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: [PATCH] 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 | 143 +++++++----- doc/classes/MeshDataTool.xml | 4 +- doc/classes/PhysicalBone3D.xml | 3 - doc/classes/ProjectSettings.xml | 4 + doc/classes/Quat.xml | 8 + doc/classes/RenderingServer.xml | 123 ++++++----- 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 ++ .../doc_classes/OpenSimplexNoise.xml | 16 +- scene/gui/control.cpp | 1 - scene/resources/mesh.cpp | 65 +----- servers/rendering_server.cpp | 20 ++ 20 files changed, 371 insertions(+), 336 deletions(-) diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index dc834474add..3f9083ed6eb 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 9705a196edb..89c5e355ecc 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 9f128e59421..45925dee96a 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 4b8ab3a6cf6..93384843def 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 ac371d1e7b2..a002ce636b4 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 78db09feeed..e6643ef578e 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -132,57 +132,6 @@ Blend shapes are relative to base weight. - - Mesh array contains vertices. All meshes require a vertex array so this should always be present. - - - Mesh array contains normals. - - - Mesh array contains tangents. - - - Mesh array contains colors. - - - Mesh array contains UVs. - - - 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. - - - 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. - - - 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. @@ -201,17 +150,101 @@ 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. + + + Mesh array contains normals. + + + Mesh array contains tangents. + + + Mesh array contains colors. + + + Mesh array contains UVs. + + + Mesh array contains second UV. + + + + + + + + + + + Mesh array contains bones. + + + Mesh array contains bone weights. + + + Mesh array uses indices. + + + + + + + + + + + + + + + + + + + Flag used to mark that the array contains 2D vertices. + + + + + diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index e107b1a1080..d4157dd4c95 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 0808e4a7247..dcf24c1d32f 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 fa4ce9bc6d0..eab06f633cf 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 5932a624f28..00ad4ee9342 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 77a80cb8b61..f36713a81a2 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 4faff95fd3b..faf0d97766d 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 4f02cd00dd3..82ffe86251d 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 43388bb7f15..9c34c63e2f5 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 1125a1da942..90d05919499 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 85dc5e8fd8d..e2cf848f452 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. + + + + + + + + + + + + + + + + + + diff --git a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml index d89828037f5..9fe4c9c2499 100644 --- a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml +++ b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml @@ -24,7 +24,7 @@ - + @@ -35,7 +35,7 @@ Generate a noise image with the requested [code]width[/code] and [code]height[/code], based on the current noise parameters. - + @@ -45,7 +45,7 @@ [b]Note:[/b] This method actually returns the 2D noise value [code][-1,1][/code] with fixed y-coordinate value 0.0. - + @@ -56,7 +56,7 @@ Returns the 2D noise value [code][-1,1][/code] at the given position. - + @@ -65,7 +65,7 @@ Returns the 2D noise value [code][-1,1][/code] at the given position. - + @@ -78,7 +78,7 @@ Returns the 3D noise value [code][-1,1][/code] at the given position. - + @@ -87,7 +87,7 @@ Returns the 3D noise value [code][-1,1][/code] at the given position. - + @@ -102,7 +102,7 @@ Returns the 4D noise value [code][-1,1][/code] at the given position. - + diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 46c3a44e982..f9b7d828f4c 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2983,7 +2983,6 @@ void Control::_bind_methods() { BIND_VMETHOD(MethodInfo("_structured_text_parser", PropertyInfo(Variant::ARRAY, "args"), PropertyInfo(Variant::STRING, "text"))); BIND_VMETHOD(MethodInfo("_gui_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); - BIND_VMETHOD(MethodInfo("_unhandled_key_input", PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_get_minimum_size")); MethodInfo get_drag_data = MethodInfo("get_drag_data", PropertyInfo(Variant::VECTOR2, "position")); diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 64579e1e37a..d12f92f8f79 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -581,6 +581,7 @@ Vector> Mesh::convex_decompose() const { Mesh::Mesh() { } + #if 0 static Vector _fix_array_compatibility(const Vector &p_src, uint32_t p_format, uint32_t p_elements) { enum ArrayType { @@ -732,6 +733,7 @@ static Vector _fix_array_compatibility(const Vector &p_src, ui return ret; } #endif + bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { String sname = p_name; @@ -1186,14 +1188,16 @@ void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array & Error err = RS::get_singleton()->mesh_create_surface_data_from_arrays(&surface, (RenderingServer::PrimitiveType)p_primitive, p_arrays, p_blend_shapes, p_lods, p_flags); ERR_FAIL_COND(err != OK); - /* print_line("format: " + itos(surface.format)); + /* Debug code. + print_line("format: " + itos(surface.format)); print_line("aabb: " + surface.aabb); print_line("array size: " + itos(surface.vertex_data.size())); print_line("vertex count: " + itos(surface.vertex_count)); print_line("index size: " + itos(surface.index_data.size())); print_line("index count: " + itos(surface.index_count)); print_line("primitive: " + itos(surface.primitive)); -*/ + */ + add_surface(surface.format, PrimitiveType(surface.primitive), surface.vertex_data, surface.attribute_data, surface.skin_data, surface.vertex_count, surface.index_data, surface.index_count, surface.aabb, surface.blend_shape_data, surface.blend_shape_count, surface.bone_aabbs, surface.lods); } @@ -1611,63 +1615,6 @@ void ArrayMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_surfaces", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_surfaces", "_get_surfaces"); ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_shape_mode", PROPERTY_HINT_ENUM, "Normalized,Relative"), "set_blend_shape_mode", "get_blend_shape_mode"); ADD_PROPERTY(PropertyInfo(Variant::AABB, "custom_aabb", PROPERTY_HINT_NONE, ""), "set_custom_aabb", "get_custom_aabb"); - - BIND_CONSTANT(NO_INDEX_ARRAY); - BIND_CONSTANT(ARRAY_WEIGHTS_SIZE); - - BIND_ENUM_CONSTANT(ARRAY_VERTEX); - BIND_ENUM_CONSTANT(ARRAY_NORMAL); - BIND_ENUM_CONSTANT(ARRAY_TANGENT); - BIND_ENUM_CONSTANT(ARRAY_COLOR); - BIND_ENUM_CONSTANT(ARRAY_TEX_UV); - BIND_ENUM_CONSTANT(ARRAY_TEX_UV2); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM0); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM1); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM2); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM3); - BIND_ENUM_CONSTANT(ARRAY_BONES); - BIND_ENUM_CONSTANT(ARRAY_WEIGHTS); - BIND_ENUM_CONSTANT(ARRAY_INDEX); - BIND_ENUM_CONSTANT(ARRAY_MAX); - - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_RGBA8_UNORM); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_RGBA8_SNORM); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_RG_HALF); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_RGBA_HALF); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_R_FLOAT); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_RG_FLOAT); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_RGB_FLOAT); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_RGBA_FLOAT); - BIND_ENUM_CONSTANT(ARRAY_CUSTOM_MAX); - - BIND_ENUM_CONSTANT(ARRAY_FORMAT_VERTEX); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_NORMAL); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_TANGENT); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_COLOR); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV2); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM0); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM1); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM2); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM3); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_BONES); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_WEIGHTS); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_INDEX); - - BIND_ENUM_CONSTANT(ARRAY_FORMAT_BLEND_SHAPE_MASK); - - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM_BASE); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM0_SHIFT); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM1_SHIFT); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM2_SHIFT); - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM3_SHIFT); - - BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM_MASK); - BIND_ENUM_CONSTANT(ARRAY_COMPRESS_FLAGS_BASE); - - BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_2D_VERTICES); - BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_DYNAMIC_UPDATE); - BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_8_BONE_WEIGHTS); } void ArrayMesh::reload_from_file() { diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 599b9e09f2e..433b56ab414 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1847,6 +1847,10 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(ARRAY_COLOR); BIND_ENUM_CONSTANT(ARRAY_TEX_UV); BIND_ENUM_CONSTANT(ARRAY_TEX_UV2); + BIND_ENUM_CONSTANT(ARRAY_CUSTOM0); + BIND_ENUM_CONSTANT(ARRAY_CUSTOM1); + BIND_ENUM_CONSTANT(ARRAY_CUSTOM2); + BIND_ENUM_CONSTANT(ARRAY_CUSTOM3); BIND_ENUM_CONSTANT(ARRAY_BONES); BIND_ENUM_CONSTANT(ARRAY_WEIGHTS); BIND_ENUM_CONSTANT(ARRAY_INDEX); @@ -1858,12 +1862,28 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(ARRAY_FORMAT_COLOR); BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV); BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV2); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM0); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM1); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM2); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM3); BIND_ENUM_CONSTANT(ARRAY_FORMAT_BONES); BIND_ENUM_CONSTANT(ARRAY_FORMAT_WEIGHTS); BIND_ENUM_CONSTANT(ARRAY_FORMAT_INDEX); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_BLEND_SHAPE_MASK); + + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM_BASE); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM0_SHIFT); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM1_SHIFT); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM2_SHIFT); + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM3_SHIFT); + + BIND_ENUM_CONSTANT(ARRAY_FORMAT_CUSTOM_MASK); + BIND_ENUM_CONSTANT(ARRAY_COMPRESS_FLAGS_BASE); + BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_2D_VERTICES); BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_DYNAMIC_UPDATE); + BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_8_BONE_WEIGHTS); BIND_ENUM_CONSTANT(PRIMITIVE_POINTS); BIND_ENUM_CONSTANT(PRIMITIVE_LINES);