summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/bind/core_bind.cpp2
-rw-r--r--core/io/packet_peer.cpp2
-rw-r--r--core/io/stream_peer.cpp4
-rw-r--r--core/math/geometry.h31
-rw-r--r--core/object.cpp2
-rw-r--r--core/undo_redo.cpp4
-rw-r--r--modules/gdscript/gd_functions.cpp4
-rw-r--r--modules/gdscript/gd_script.cpp2
-rw-r--r--scene/2d/canvas_item.cpp4
-rw-r--r--scene/2d/canvas_item.h2
-rw-r--r--scene/gui/tabs.cpp129
-rw-r--r--scene/gui/tabs.h6
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp6
-rw-r--r--scene/resources/default_theme/default_theme.cpp4
-rw-r--r--scene/resources/material.cpp4
-rw-r--r--scene/resources/shader_graph.cpp2
-rw-r--r--scene/resources/shape_2d.cpp4
-rw-r--r--servers/physics_2d_server.cpp2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp4
19 files changed, 197 insertions, 21 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 94557d149d..30c90bd71c 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1977,7 +1977,7 @@ void _Thread::_bind_methods() {
ObjectTypeDB::bind_method(_MD("start:Error","instance","method","userdata","priority"),&_Thread::start,DEFVAL(Variant()),DEFVAL(PRIORITY_NORMAL));
ObjectTypeDB::bind_method(_MD("get_id"),&_Thread::get_id);
ObjectTypeDB::bind_method(_MD("is_active"),&_Thread::is_active);
- ObjectTypeDB::bind_method(_MD("wait_to_finish:var"),&_Thread::wait_to_finish);
+ ObjectTypeDB::bind_method(_MD("wait_to_finish:Variant"),&_Thread::wait_to_finish);
BIND_CONSTANT( PRIORITY_LOW );
BIND_CONSTANT( PRIORITY_NORMAL );
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index f6d526b512..fc9e51f000 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -127,7 +127,7 @@ Error PacketPeer::_get_packet_error() const {
void PacketPeer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_var"),&PacketPeer::_bnd_get_var);
- ObjectTypeDB::bind_method(_MD("put_var", "var:var"),&PacketPeer::put_var);
+ ObjectTypeDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var);
ObjectTypeDB::bind_method(_MD("get_packet"),&PacketPeer::_get_packet);
ObjectTypeDB::bind_method(_MD("put_packet:Error", "buffer"),&PacketPeer::_put_packet);
ObjectTypeDB::bind_method(_MD("get_packet_error:Error"),&PacketPeer::_get_packet_error);
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index a76b84bed3..1b39286bf7 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -405,7 +405,7 @@ void StreamPeer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("put_float","val"),&StreamPeer::put_float);
ObjectTypeDB::bind_method(_MD("put_double","val"),&StreamPeer::put_double);
ObjectTypeDB::bind_method(_MD("put_utf8_string","val"),&StreamPeer::put_utf8_string);
- ObjectTypeDB::bind_method(_MD("put_var","val:var"),&StreamPeer::put_var);
+ ObjectTypeDB::bind_method(_MD("put_var","val:Variant"),&StreamPeer::put_var);
ObjectTypeDB::bind_method(_MD("get_8"),&StreamPeer::get_8);
ObjectTypeDB::bind_method(_MD("get_u8"),&StreamPeer::get_u8);
@@ -419,5 +419,5 @@ void StreamPeer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_double"),&StreamPeer::get_double);
ObjectTypeDB::bind_method(_MD("get_string","bytes"),&StreamPeer::get_string);
ObjectTypeDB::bind_method(_MD("get_utf8_string","bytes"),&StreamPeer::get_utf8_string);
- ObjectTypeDB::bind_method(_MD("get_var:var"),&StreamPeer::get_var);
+ ObjectTypeDB::bind_method(_MD("get_var:Variant"),&StreamPeer::get_var);
}
diff --git a/core/math/geometry.h b/core/math/geometry.h
index b438b41d61..8214895676 100644
--- a/core/math/geometry.h
+++ b/core/math/geometry.h
@@ -886,7 +886,38 @@ public:
}
+ static double vec2_cross(const Point2 &O, const Point2 &A, const Point2 &B)
+ {
+ return (double)(A.x - O.x) * (B.y - O.y) - (double)(A.y - O.y) * (B.x - O.x);
+ }
+
+ // Returns a list of points on the convex hull in counter-clockwise order.
+ // Note: the last point in the returned list is the same as the first one.
+ static Vector<Point2> convex_hull_2d(Vector<Point2> P)
+ {
+ int n = P.size(), k = 0;
+ Vector<Point2> H;
+ H.resize(2*n);
+
+ // Sort points lexicographically
+ P.sort();
+
+ // Build lower hull
+ for (int i = 0; i < n; ++i) {
+ while (k >= 2 && vec2_cross(H[k-2], H[k-1], P[i]) <= 0) k--;
+ H[k++] = P[i];
+ }
+
+ // Build upper hull
+ for (int i = n-2, t = k+1; i >= 0; i--) {
+ while (k >= t && vec2_cross(H[k-2], H[k-1], P[i]) <= 0) k--;
+ H[k++] = P[i];
+ }
+
+ H.resize(k);
+ return H;
+ }
static MeshData build_convex_mesh(const DVector<Plane> &p_planes);
static DVector<Plane> build_sphere_planes(float p_radius, int p_lats, int p_lons, Vector3::Axis p_axis=Vector3::AXIS_Z);
diff --git a/core/object.cpp b/core/object.cpp
index f6ba76a0b5..9fdd11eb2e 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1613,7 +1613,7 @@ void Object::_bind_methods() {
ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"call_deferred",&Object::_call_deferred_bind,mi,defargs);
}
- ObjectTypeDB::bind_method(_MD("callv:var","method","arg_array"),&Object::callv);
+ ObjectTypeDB::bind_method(_MD("callv:Variant","method","arg_array"),&Object::callv);
ObjectTypeDB::bind_method(_MD("has_method"),&Object::has_method);
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index 85cc2bbc7f..ece9a02e24 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -482,8 +482,8 @@ void UndoRedo::_bind_methods() {
ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"add_undo_method",&UndoRedo::_add_undo_method,mi,defargs);
}
- ObjectTypeDB::bind_method(_MD("add_do_property","object", "property", "value:var"),&UndoRedo::add_do_property);
- ObjectTypeDB::bind_method(_MD("add_undo_property","object", "property", "value:var"),&UndoRedo::add_undo_property);
+ ObjectTypeDB::bind_method(_MD("add_do_property","object", "property", "value:Variant"),&UndoRedo::add_do_property);
+ ObjectTypeDB::bind_method(_MD("add_undo_property","object", "property", "value:Variant"),&UndoRedo::add_undo_property);
ObjectTypeDB::bind_method(_MD("add_do_reference","object"),&UndoRedo::add_do_reference);
ObjectTypeDB::bind_method(_MD("add_undo_reference","object"),&UndoRedo::add_undo_reference);
ObjectTypeDB::bind_method(_MD("clear_history"),&UndoRedo::clear_history);
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index 6f51ac5312..fd92c8a9ec 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -1307,7 +1307,7 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case STR_TO_VAR: {
- MethodInfo mi("str2var:var",PropertyInfo(Variant::STRING,"string"));
+ MethodInfo mi("str2var:Variant",PropertyInfo(Variant::STRING,"string"));
mi.return_val.type=Variant::NIL;
return mi;
} break;
@@ -1338,7 +1338,7 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case HASH: {
- MethodInfo mi("hash",PropertyInfo(Variant::NIL,"var:var"));
+ MethodInfo mi("hash",PropertyInfo(Variant::NIL,"var:Variant"));
mi.return_val.type=Variant::INT;
return mi;
} break;
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index c3cc779bce..62006cf18b 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -1370,7 +1370,7 @@ Variant GDFunctionState::resume(const Variant& p_arg) {
void GDFunctionState::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("resume:var","arg"),&GDFunctionState::resume,DEFVAL(Variant()));
+ ObjectTypeDB::bind_method(_MD("resume:Variant","arg"),&GDFunctionState::resume,DEFVAL(Variant()));
ObjectTypeDB::bind_method(_MD("is_valid"),&GDFunctionState::is_valid);
ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"_signal_callback",&GDFunctionState::_signal_callback,MethodInfo("_signal_callback"));
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 295a57d033..275e4d0304 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -709,7 +709,7 @@ void CanvasItem::draw_circle(const Point2& p_pos, float p_radius, const Color& p
}
-void CanvasItem::draw_texture(const Ref<Texture>& p_texture,const Point2& p_pos) {
+void CanvasItem::draw_texture(const Ref<Texture>& p_texture,const Point2& p_pos,const Color& p_modulate) {
if (!drawing) {
ERR_EXPLAIN("Drawing is only allowed inside NOTIFICATION_DRAW, _draw() function or 'draw' signal.");
@@ -718,7 +718,7 @@ void CanvasItem::draw_texture(const Ref<Texture>& p_texture,const Point2& p_pos)
ERR_FAIL_COND(p_texture.is_null());
- p_texture->draw(canvas_item,p_pos);
+ p_texture->draw(canvas_item,p_pos,p_modulate);
}
void CanvasItem::draw_texture_rect(const Ref<Texture>& p_texture,const Rect2& p_rect, bool p_tile,const Color& p_modulate, bool p_transpose) {
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index 667fedc956..4c0386b953 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -211,7 +211,7 @@ public:
void draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width=1.0);
void draw_rect(const Rect2& p_rect, const Color& p_color);
void draw_circle(const Point2& p_pos, float p_radius, const Color& p_color);
- void draw_texture(const Ref<Texture>& p_texture,const Point2& p_pos);
+ void draw_texture(const Ref<Texture>& p_texture, const Point2& p_pos, const Color &p_modulate=Color(1,1,1,1));
void draw_texture_rect(const Ref<Texture>& p_texture, const Rect2& p_rect, bool p_tile=false,const Color& p_modulate=Color(1,1,1), bool p_transpose=false);
void draw_texture_rect_region(const Ref<Texture>& p_texture,const Rect2& p_rect, const Rect2& p_src_rect,const Color& p_modulate=Color(1,1,1), bool p_transpose=false);
void draw_style_box(const Ref<StyleBox>& p_style_box,const Rect2& p_rect);
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index 47a55e0716..5f4215a1d5 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -74,6 +74,7 @@ Size2 Tabs::get_minimum_size() const {
}
}
+ ms.width=0; //should make this optional
return ms;
}
@@ -85,6 +86,23 @@ void Tabs::_input_event(const InputEvent& p_event) {
Point2 pos( p_event.mouse_motion.x, p_event.mouse_motion.y );
+ hilite_arrow=-1;
+ if (buttons_visible) {
+
+ Ref<Texture> incr = get_icon("increment");
+ Ref<Texture> decr = get_icon("decrement");
+
+ int limit=get_size().width-incr->get_width()-decr->get_width();
+
+ if (pos.x>limit+decr->get_width()) {
+ hilite_arrow=1;
+ } else if (pos.x>limit) {
+ hilite_arrow=0;
+ }
+ }
+
+
+
int hover_buttons=-1;
hover=-1;
for(int i=0;i<tabs.size();i++) {
@@ -163,9 +181,34 @@ void Tabs::_input_event(const InputEvent& p_event) {
// clicks
Point2 pos( p_event.mouse_button.x, p_event.mouse_button.y );
+ if (buttons_visible) {
+
+ Ref<Texture> incr = get_icon("increment");
+ Ref<Texture> decr = get_icon("decrement");
+
+ int limit=get_size().width-incr->get_width()-decr->get_width();
+
+ if (pos.x>limit+decr->get_width()) {
+ if (missing_right) {
+ offset++;
+ update();
+ }
+ return;
+ } else if (pos.x>limit) {
+ if (offset>0) {
+ offset--;
+ update();
+ }
+ return;
+ }
+ }
+
+
int found=-1;
for(int i=0;i<tabs.size();i++) {
+ if (i<offset)
+ continue;
if (tabs[i].rb_rect.has_point(pos)) {
rb_pressing=true;
update();
@@ -225,7 +268,46 @@ void Tabs::_notification(int p_what) {
int w=0;
- int mw = get_minimum_size().width;
+ int mw = 0;
+
+ {
+
+
+ // h+=MIN( get_constant("label_valign_fg"), get_constant("label_valign_bg") );
+
+ for(int i=0;i<tabs.size();i++) {
+
+ Ref<Texture> tex = tabs[i].icon;
+ if (tex.is_valid()) {
+ if (tabs[i].text!="")
+ mw+=get_constant("hseparation");
+
+ }
+ mw+=font->get_string_size(tabs[i].text).width;
+ if (current==i)
+ mw+=tab_fg->get_minimum_size().width;
+ else
+ mw+=tab_bg->get_minimum_size().width;
+
+ if (tabs[i].right_button.is_valid()) {
+ Ref<Texture> rb=tabs[i].right_button;
+ Size2 bms = rb->get_size();//+get_stylebox("button")->get_minimum_size();
+ bms.width+=get_constant("hseparation");
+
+ mw+=bms.width;
+ }
+
+ if (tabs[i].close_button.is_valid()) {
+ Ref<Texture> cb=tabs[i].close_button;
+ Size2 bms = cb->get_size();//+get_stylebox("button")->get_minimum_size();
+ bms.width+=get_constant("hseparation");
+ mw+=bms.width;
+ }
+ }
+
+ }
+
+
if (tab_align==ALIGN_CENTER) {
w=(get_size().width-mw)/2;
@@ -238,8 +320,19 @@ void Tabs::_notification(int p_what) {
w=0;
}
+ Ref<Texture> incr = get_icon("increment");
+ Ref<Texture> decr = get_icon("decrement");
+ Ref<Texture> incr_hl = get_icon("increment_hilite");
+ Ref<Texture> decr_hl = get_icon("decrement_hilite");
+
+ int limit=get_size().width - incr->get_size().width - decr->get_size().width;
+
+ missing_right=false;
+
for(int i=0;i<tabs.size();i++) {
+ if (i<offset)
+ continue;
tabs[i].ofs_cache=w;
String s = tabs[i].text;
@@ -247,6 +340,8 @@ void Tabs::_notification(int p_what) {
int slen=font->get_string_size(s).width;
lsize+=slen;
+
+
Ref<Texture> icon;
if (tabs[i].icon.is_valid()) {
icon = tabs[i].icon;
@@ -319,6 +414,16 @@ void Tabs::_notification(int p_what) {
}
+ if (w+lsize > limit) {
+ max_drawn_tab=i-1;
+ missing_right=true;
+ break;
+ } else {
+ max_drawn_tab=i;
+ }
+
+
+
Ref<StyleBox> sb;
int va;
Color col;
@@ -484,6 +589,25 @@ void Tabs::_notification(int p_what) {
}
+ if (offset>0 || missing_right) {
+
+ int vofs = (get_size().height-incr->get_size().height)/2;
+
+ if (offset>0)
+ draw_texture(hilite_arrow==0?decr_hl:decr,Point2(limit,vofs));
+ else
+ draw_texture(decr,Point2(limit,vofs),Color(1,1,1,0.5));
+
+ if (missing_right)
+ draw_texture(hilite_arrow==1?incr_hl:incr,Point2(limit+decr->get_size().width,vofs));
+ else
+ draw_texture(incr,Point2(limit+decr->get_size().width,vofs),Color(1,1,1,0.5));
+
+ buttons_visible=true;
+ } else {
+ buttons_visible=false;
+ }
+
} break;
}
@@ -673,8 +797,11 @@ Tabs::Tabs() {
tab_align=ALIGN_CENTER;
rb_hover=-1;
rb_pressing=false;
+ hilite_arrow=-1;
cb_hover=-1;
cb_pressing=false;
cb_displaypolicy = SHOW_NEVER; // Default : no close button
+ offset=0;
+ max_drawn_tab=0;
}
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index 1a8352bc93..48fbed1f76 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -65,6 +65,12 @@ private:
Rect2 cb_rect;
};
+
+ int offset;
+ int max_drawn_tab;
+ int hilite_arrow;
+ bool buttons_visible;
+ bool missing_right;
Vector<Tab> tabs;
int current;
Control *_get_tab(int idx) const;
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index a1137ba614..86cf818ac3 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -30,6 +30,8 @@
#include "servers/physics_2d_server.h"
#include "servers/visual_server.h"
+#include "geometry.h"
+
void ConvexPolygonShape2D::_update_shape() {
Physics2DServer::get_singleton()->shape_set_data(get_rid(),points);
@@ -40,7 +42,9 @@ void ConvexPolygonShape2D::_update_shape() {
void ConvexPolygonShape2D::set_point_cloud(const Vector<Vector2>& p_points) {
-
+ Vector<Point2> hull=Geometry::convex_hull_2d(p_points);
+ ERR_FAIL_COND(hull.size()<3);
+ set_points(hull);
}
void ConvexPolygonShape2D::set_points(const Vector<Vector2>& p_points) {
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 25407a5b84..33e1eb338e 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -709,6 +709,10 @@ void make_default_theme() {
t->set_stylebox("button_pressed","Tabs", make_stylebox( button_pressed_png,4,4,4,4) );
t->set_stylebox("button","Tabs", make_stylebox( button_normal_png,4,4,4,4) );
+ t->set_icon("increment","Tabs",make_icon( scroll_button_right_png));
+ t->set_icon("increment_hilite","Tabs",make_icon( scroll_button_right_hl_png));
+ t->set_icon("decrement","Tabs",make_icon( scroll_button_left_png));
+ t->set_icon("decrement_hilite","Tabs",make_icon( scroll_button_left_hl_png));
t->set_font("font","Tabs", default_font );
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index b4ea60cb8d..51d8be3294 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -572,8 +572,8 @@ void ShaderMaterial::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_shader","shader:Shader"), &ShaderMaterial::set_shader );
ObjectTypeDB::bind_method(_MD("get_shader:Shader"), &ShaderMaterial::get_shader );
- ObjectTypeDB::bind_method(_MD("set_shader_param","param","value:var"), &ShaderMaterial::set_shader_param);
- ObjectTypeDB::bind_method(_MD("get_shader_param:var","param"), &ShaderMaterial::get_shader_param);
+ ObjectTypeDB::bind_method(_MD("set_shader_param","param","value:Variant"), &ShaderMaterial::set_shader_param);
+ ObjectTypeDB::bind_method(_MD("get_shader_param:Variant","param"), &ShaderMaterial::get_shader_param);
ObjectTypeDB::bind_method(_MD("_shader_changed"), &ShaderMaterial::_shader_changed );
}
diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp
index 7b67eaeda8..f8a14e58a0 100644
--- a/scene/resources/shader_graph.cpp
+++ b/scene/resources/shader_graph.cpp
@@ -260,7 +260,7 @@ void ShaderGraph::_bind_methods() {
ObjectTypeDB::bind_method(_MD("clear","shader_type"),&ShaderGraph::clear);
ObjectTypeDB::bind_method(_MD("node_set_state","shader_type","id","state"),&ShaderGraph::node_set_state);
- ObjectTypeDB::bind_method(_MD("node_get_state:var","shader_type","id"),&ShaderGraph::node_get_state);
+ ObjectTypeDB::bind_method(_MD("node_get_state:Variant","shader_type","id"),&ShaderGraph::node_get_state);
ObjectTypeDB::bind_method(_MD("_set_data"),&ShaderGraph::_set_data);
ObjectTypeDB::bind_method(_MD("_get_data"),&ShaderGraph::_get_data);
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 31b28ee892..56fd8e212e 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -108,8 +108,8 @@ void Shape2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_custom_solver_bias"),&Shape2D::get_custom_solver_bias);
ObjectTypeDB::bind_method(_MD("collide","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide);
ObjectTypeDB::bind_method(_MD("collide_with_motion","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion);
- ObjectTypeDB::bind_method(_MD("collide_and_get_contacts:var","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide_and_get_contacts);
- ObjectTypeDB::bind_method(_MD("collide_with_motion_and_get_contacts:var","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion_and_get_contacts);
+ ObjectTypeDB::bind_method(_MD("collide_and_get_contacts:Variant","local_xform","with_shape:Shape2D","shape_xform"),&Shape2D::collide_and_get_contacts);
+ ObjectTypeDB::bind_method(_MD("collide_with_motion_and_get_contacts:Variant","local_xform","local_motion","with_shape:Shape2D","shape_xform","shape_motion"),&Shape2D::collide_with_motion_and_get_contacts);
ADD_PROPERTY( PropertyInfo(Variant::REAL,"custom_solver_bias",PROPERTY_HINT_RANGE,"0,1,0.001"),_SCS("set_custom_solver_bias"),_SCS("get_custom_solver_bias"));
}
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index b9d15d6e35..5d8446ed38 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -102,7 +102,7 @@ void Physics2DDirectBodyState::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_contact_collider_id","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_id);
ObjectTypeDB::bind_method(_MD("get_contact_collider_object","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_object);
ObjectTypeDB::bind_method(_MD("get_contact_collider_shape","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_shape);
- ObjectTypeDB::bind_method(_MD("get_contact_collider_shape_metadata:var","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_shape_metadata);
+ ObjectTypeDB::bind_method(_MD("get_contact_collider_shape_metadata:Variant","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_shape_metadata);
ObjectTypeDB::bind_method(_MD("get_contact_collider_velocity_at_pos","contact_idx"),&Physics2DDirectBodyState::get_contact_collider_velocity_at_pos);
ObjectTypeDB::bind_method(_MD("get_step"),&Physics2DDirectBodyState::get_step);
ObjectTypeDB::bind_method(_MD("integrate_forces"),&Physics2DDirectBodyState::integrate_forces);
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index df6397ed1d..178871ea75 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -2256,6 +2256,10 @@ void ScriptEditor::_history_back(){
void ScriptEditor::set_scene_root_script( Ref<Script> p_script ) {
bool open_dominant = EditorSettings::get_singleton()->get("text_editor/open_dominant_script_on_scene_change");
+
+ if (bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor")))
+ return;
+
if (open_dominant && p_script.is_valid()) {
edit(p_script);
}