Fix a few default parameters in bindings

They have the wrong type and cause issues with extensions.
This commit is contained in:
George Marques 2021-07-29 10:42:05 -03:00
parent 626c0b6905
commit 97947bc063
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
4 changed files with 8 additions and 8 deletions

View file

@ -1709,7 +1709,7 @@ static void _register_variant_builtin_methods() {
bind_method(Transform2D, interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform2D, is_equal_approx, sarray("xform"), varray());
bind_method(Transform2D, set_rotation, sarray("rotation"), varray());
bind_method(Transform2D, looking_at, sarray("target"), varray(Transform2D()));
bind_method(Transform2D, looking_at, sarray("target"), varray(Vector2()));
/* Basis */

View file

@ -142,7 +142,7 @@
<argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" />
<argument index="6" name="clear_depth" type="float" default="1.0" />
<argument index="7" name="clear_stencil" type="int" default="0" />
<argument index="8" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)" />
<argument index="8" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<argument index="9" name="storage_textures" type="Array" default="[]" />
<description>
</description>
@ -165,7 +165,7 @@
<argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" />
<argument index="7" name="clear_depth" type="float" default="1.0" />
<argument index="8" name="clear_stencil" type="int" default="0" />
<argument index="9" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)" />
<argument index="9" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<argument index="10" name="storage_textures" type="RID[]" default="[]" />
<description>
</description>
@ -217,7 +217,7 @@
<method name="draw_list_enable_scissor">
<return type="void" />
<argument index="0" name="draw_list" type="int" />
<argument index="1" name="rect" type="Rect2" default="Rect2i(0, 0, 0, 0)" />
<argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<description>
</description>
</method>

View file

@ -107,7 +107,7 @@
</method>
<method name="looking_at" qualifiers="const">
<return type="Transform2D" />
<argument index="0" name="target" type="Vector2" default="Transform2D(1, 0, 0, 1, 0, 0)" />
<argument index="0" name="target" type="Vector2" default="Vector2(0, 0)" />
<description>
Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position.
Operations take place in global space.

View file

@ -420,8 +420,8 @@ void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_list_begin_for_screen", "screen", "clear_color"), &RenderingDevice::draw_list_begin_for_screen, DEFVAL(DisplayServer::MAIN_WINDOW_ID), DEFVAL(Color()));
ClassDB::bind_method(D_METHOD("draw_list_begin", "framebuffer", "initial_color_action", "final_color_action", "initial_depth_action", "final_depth_action", "clear_color_values", "clear_depth", "clear_stencil", "region", "storage_textures"), &RenderingDevice::draw_list_begin, DEFVAL(Vector<Color>()), DEFVAL(1.0), DEFVAL(0), DEFVAL(Rect2i()), DEFVAL(TypedArray<RID>()));
ClassDB::bind_method(D_METHOD("draw_list_begin_split", "framebuffer", "splits", "initial_color_action", "final_color_action", "initial_depth_action", "final_depth_action", "clear_color_values", "clear_depth", "clear_stencil", "region", "storage_textures"), &RenderingDevice::_draw_list_begin_split, DEFVAL(Vector<Color>()), DEFVAL(1.0), DEFVAL(0), DEFVAL(Rect2i()), DEFVAL(TypedArray<RID>()));
ClassDB::bind_method(D_METHOD("draw_list_begin", "framebuffer", "initial_color_action", "final_color_action", "initial_depth_action", "final_depth_action", "clear_color_values", "clear_depth", "clear_stencil", "region", "storage_textures"), &RenderingDevice::draw_list_begin, DEFVAL(Vector<Color>()), DEFVAL(1.0), DEFVAL(0), DEFVAL(Rect2()), DEFVAL(TypedArray<RID>()));
ClassDB::bind_method(D_METHOD("draw_list_begin_split", "framebuffer", "splits", "initial_color_action", "final_color_action", "initial_depth_action", "final_depth_action", "clear_color_values", "clear_depth", "clear_stencil", "region", "storage_textures"), &RenderingDevice::_draw_list_begin_split, DEFVAL(Vector<Color>()), DEFVAL(1.0), DEFVAL(0), DEFVAL(Rect2()), DEFVAL(TypedArray<RID>()));
ClassDB::bind_method(D_METHOD("draw_list_bind_render_pipeline", "draw_list", "render_pipeline"), &RenderingDevice::draw_list_bind_render_pipeline);
ClassDB::bind_method(D_METHOD("draw_list_bind_uniform_set", "draw_list", "uniform_set", "set_index"), &RenderingDevice::draw_list_bind_uniform_set);
@ -431,7 +431,7 @@ void RenderingDevice::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_list_draw", "draw_list", "use_indices", "instances", "procedural_vertex_count"), &RenderingDevice::draw_list_draw, DEFVAL(0));
ClassDB::bind_method(D_METHOD("draw_list_enable_scissor", "draw_list", "rect"), &RenderingDevice::draw_list_enable_scissor, DEFVAL(Rect2i()));
ClassDB::bind_method(D_METHOD("draw_list_enable_scissor", "draw_list", "rect"), &RenderingDevice::draw_list_enable_scissor, DEFVAL(Rect2()));
ClassDB::bind_method(D_METHOD("draw_list_disable_scissor", "draw_list"), &RenderingDevice::draw_list_disable_scissor);
ClassDB::bind_method(D_METHOD("draw_list_switch_to_next_pass"), &RenderingDevice::draw_list_switch_to_next_pass);