From aa9908e4f601e368517c6f23406e8c15e3f197a3 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Wed, 3 Jul 2019 09:49:46 +0200 Subject: Script API methods must return Ref instead of Reference* ptrcall assumes methods that return a Reference type do so with Ref. Returning Reference* from a method exposed to the scripting API completely breaks ptrcalls to this method (it can be quite hard to debug!). --- editor/plugins/spatial_editor_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor/plugins') diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 3bddc6d6d4..0404115269 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -119,7 +119,7 @@ public: void set_spatial_node(Spatial *p_node); Spatial *get_spatial_node() const { return spatial_node; } - EditorSpatialGizmoPlugin *get_plugin() const { return gizmo_plugin; } + Ref get_plugin() const { return gizmo_plugin; } Vector3 get_handle_pos(int p_idx) const; bool intersect_frustum(const Camera *p_camera, const Vector &p_frustum); bool intersect_ray(Camera *p_camera, const Point2 &p_point, Vector3 &r_pos, Vector3 &r_normal, int *r_gizmo_handle = NULL, bool p_sec_first = false); -- cgit v1.2.3