summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-07-03 09:49:46 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-07-05 09:38:28 +0200
commitaa9908e4f601e368517c6f23406e8c15e3f197a3 (patch)
tree99b80f4c492d5a8aabf15e3f1b7ce743bd77bff6 /editor/plugins
parent270af6fa089ccfb93ace68ada8d476bd902b10fa (diff)
Script API methods must return Ref<T> instead of Reference*
ptrcall assumes methods that return a Reference type do so with Ref<T>. Returning Reference* from a method exposed to the scripting API completely breaks ptrcalls to this method (it can be quite hard to debug!).
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/spatial_editor_plugin.h2
1 files changed, 1 insertions, 1 deletions
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<EditorSpatialGizmoPlugin> get_plugin() const { return gizmo_plugin; }
Vector3 get_handle_pos(int p_idx) const;
bool intersect_frustum(const Camera *p_camera, const Vector<Plane> &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);