From 5acb19630da11a6b072cd1b587c349809178a8c4 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 31 May 2023 22:14:12 +0200 Subject: [PATCH] Fix the order of some default arguments in bindings. --- modules/props/prop_mesher.cpp | 2 +- modules/props_2d/prop_2d_mesher.cpp | 2 +- modules/terraman/meshers/terrain_mesher.cpp | 2 +- modules/terraman_2d/meshers/terrain_2d_mesher.cpp | 2 +- modules/voxelman/meshers/voxel_mesher.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/props/prop_mesher.cpp b/modules/props/prop_mesher.cpp index 5c341bb6b..614a5739a 100644 --- a/modules/props/prop_mesher.cpp +++ b/modules/props/prop_mesher.cpp @@ -1565,7 +1565,7 @@ void PropMesher::_bind_methods() { ClassDB::bind_method(D_METHOD("transform_uv_scaled", "uv", "rect", "x", "y", "texture_scale"), &PropMesher::transform_uv_scaled); #ifdef MODULE_MESH_DATA_RESOURCE_ENABLED - ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &PropMesher::add_mesh_data_resource, DEFVAL(Rect2(0, 0, 1, 1)), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Vector3()), DEFVAL(Vector3())); + ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &PropMesher::add_mesh_data_resource, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform", "mesh", "transform", "uv_rect"), &PropMesher::add_mesh_data_resource_transform, DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform_colored", "mesh", "transform", "colors", "uv_rect"), &PropMesher::add_mesh_data_resource_transform_colored, DEFVAL(Rect2(0, 0, 1, 1))); #endif diff --git a/modules/props_2d/prop_2d_mesher.cpp b/modules/props_2d/prop_2d_mesher.cpp index 59a3cbfdf..e5db698dc 100644 --- a/modules/props_2d/prop_2d_mesher.cpp +++ b/modules/props_2d/prop_2d_mesher.cpp @@ -1173,7 +1173,7 @@ void Prop2DMesher::_bind_methods() { ClassDB::bind_method(D_METHOD("transform_uv", "uv", "rect"), &Prop2DMesher::transform_uv); #ifdef MODULE_MESH_DATA_RESOURCE_ENABLED - ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &Prop2DMesher::add_mesh_data_resource, DEFVAL(Rect2(0, 0, 1, 1)), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Vector3()), DEFVAL(Vector3())); + ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &Prop2DMesher::add_mesh_data_resource, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform", "mesh", "transform", "uv_rect"), &Prop2DMesher::add_mesh_data_resource_transform, DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform_colored", "mesh", "transform", "colors", "uv_rect"), &Prop2DMesher::add_mesh_data_resource_transform_colored, DEFVAL(Rect2(0, 0, 1, 1))); #endif diff --git a/modules/terraman/meshers/terrain_mesher.cpp b/modules/terraman/meshers/terrain_mesher.cpp index c502e6e89..a6b05ce7c 100644 --- a/modules/terraman/meshers/terrain_mesher.cpp +++ b/modules/terraman/meshers/terrain_mesher.cpp @@ -995,7 +995,7 @@ void TerrainMesher::_bind_methods() { ClassDB::bind_method(D_METHOD("add_chunk", "chunk"), &TerrainMesher::add_chunk); #ifdef MODULE_MESH_DATA_RESOURCE_ENABLED - ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &TerrainMesher::add_mesh_data_resource, DEFVAL(Rect2(0, 0, 1, 1)), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Vector3()), DEFVAL(Vector3())); + ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &TerrainMesher::add_mesh_data_resource, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform", "mesh", "transform", "uv_rect"), &TerrainMesher::add_mesh_data_resource_transform, DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform_colored", "mesh", "transform", "colors", "uv_rect"), &TerrainMesher::add_mesh_data_resource_transform_colored, DEFVAL(Rect2(0, 0, 1, 1))); #endif diff --git a/modules/terraman_2d/meshers/terrain_2d_mesher.cpp b/modules/terraman_2d/meshers/terrain_2d_mesher.cpp index 576bc1ade..5796cafbd 100644 --- a/modules/terraman_2d/meshers/terrain_2d_mesher.cpp +++ b/modules/terraman_2d/meshers/terrain_2d_mesher.cpp @@ -938,7 +938,7 @@ void Terrain2DMesher::_bind_methods() { ClassDB::bind_method(D_METHOD("add_chunk", "chunk"), &Terrain2DMesher::add_chunk); #ifdef MODULE_MESH_DATA_RESOURCE_ENABLED - ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &Terrain2DMesher::add_mesh_data_resource, DEFVAL(Rect2(0, 0, 1, 1)), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Vector3()), DEFVAL(Vector3())); + ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &Terrain2DMesher::add_mesh_data_resource, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform", "mesh", "transform", "uv_rect"), &Terrain2DMesher::add_mesh_data_resource_transform, DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform_colored", "mesh", "transform", "colors", "uv_rect"), &Terrain2DMesher::add_mesh_data_resource_transform_colored, DEFVAL(Rect2(0, 0, 1, 1))); #endif diff --git a/modules/voxelman/meshers/voxel_mesher.cpp b/modules/voxelman/meshers/voxel_mesher.cpp index 863cb3a0a..de88d9dbe 100644 --- a/modules/voxelman/meshers/voxel_mesher.cpp +++ b/modules/voxelman/meshers/voxel_mesher.cpp @@ -861,7 +861,7 @@ void VoxelMesher::add_uv2(const Vector2 &uv) { Vector2 VoxelMesher::get_uv2(const int idx) const { ERR_FAIL_INDEX_V(idx, _vertices.size(), Vector2()); - + return _vertices.get(idx).uv2; } @@ -984,7 +984,7 @@ void VoxelMesher::_bind_methods() { ClassDB::bind_method(D_METHOD("add_chunk", "chunk"), &VoxelMesher::add_chunk); #ifdef MODULE_MESH_DATA_RESOURCE_ENABLED - ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &VoxelMesher::add_mesh_data_resource, DEFVAL(Rect2(0, 0, 1, 1)), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Vector3()), DEFVAL(Vector3())); + ClassDB::bind_method(D_METHOD("add_mesh_data_resource", "mesh", "position", "rotation", "scale", "uv_rect"), &VoxelMesher::add_mesh_data_resource, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(Vector3(1.0, 1.0, 1.0)), DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform", "mesh", "transform", "uv_rect"), &VoxelMesher::add_mesh_data_resource_transform, DEFVAL(Rect2(0, 0, 1, 1))); ClassDB::bind_method(D_METHOD("add_mesh_data_resource_transform_colored", "mesh", "transform", "colors", "uv_rect"), &VoxelMesher::add_mesh_data_resource_transform_colored, DEFVAL(Rect2(0, 0, 1, 1))); #endif