summaryrefslogtreecommitdiffstats
path: root/scene/resources/surface_tool.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-05-08 13:52:42 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-05-08 13:52:42 +0200
commit3e6a731904105ecb6712248106acd1c78eb2cd3c (patch)
treedefdbf2b3d63dc6a51d5a9fd3c32bf8ab280926a /scene/resources/surface_tool.cpp
parent70f69f6c72120c8870f3605ea76424baf59a7071 (diff)
parent1c93606e470f0cad5f14af104ccb89a95a89931c (diff)
downloadredot-engine-3e6a731904105ecb6712248106acd1c78eb2cd3c.tar.gz
Merge pull request #76418 from reduz/method-bind-validated-call
Add ValidatedCall to MethodBind
Diffstat (limited to 'scene/resources/surface_tool.cpp')
-rw-r--r--scene/resources/surface_tool.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 5ef3e09e3d..c296523475 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -374,6 +374,10 @@ void SurfaceTool::set_smooth_group(uint32_t p_group) {
last_smooth_group = p_group;
}
+void SurfaceTool::_add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const TypedArray<Plane> &p_tangents) {
+ add_triangle_fan(p_vertices, p_uv2s, p_colors, p_uv2s, p_normals, Variant(p_tangents));
+}
+
void SurfaceTool::add_triangle_fan(const Vector<Vector3> &p_vertices, const Vector<Vector2> &p_uvs, const Vector<Color> &p_colors, const Vector<Vector2> &p_uv2s, const Vector<Vector3> &p_normals, const Vector<Plane> &p_tangents) {
ERR_FAIL_COND(!begun);
ERR_FAIL_COND(primitive != Mesh::PRIMITIVE_TRIANGLES);
@@ -1347,7 +1351,7 @@ void SurfaceTool::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_custom", "channel_index", "custom_color"), &SurfaceTool::set_custom);
ClassDB::bind_method(D_METHOD("set_smooth_group", "index"), &SurfaceTool::set_smooth_group);
- ClassDB::bind_method(D_METHOD("add_triangle_fan", "vertices", "uvs", "colors", "uv2s", "normals", "tangents"), &SurfaceTool::add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Vector3>()), DEFVAL(Vector<Plane>()));
+ ClassDB::bind_method(D_METHOD("add_triangle_fan", "vertices", "uvs", "colors", "uv2s", "normals", "tangents"), &SurfaceTool::_add_triangle_fan, DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Color>()), DEFVAL(Vector<Vector2>()), DEFVAL(Vector<Vector3>()), DEFVAL(TypedArray<Plane>()));
ClassDB::bind_method(D_METHOD("add_index", "index"), &SurfaceTool::add_index);