diff options
author | Franklin Sobrinho <franklin_gs@hotmail.com> | 2016-07-09 13:10:13 -0300 |
---|---|---|
committer | Franklin Sobrinho <franklin_gs@hotmail.com> | 2016-07-09 13:10:13 -0300 |
commit | 914d670a7164b920d0b465950083aea7924de937 (patch) | |
tree | c3b7ae5ba995da72f4e45b4419db18b9826cb4a9 /tools/editor/plugins/spatial_editor_plugin.cpp | |
parent | 0e119a91640acbc7643ff1dd1049bf12ca302d21 (diff) |
Fix EditorSpatialGizmo virtual functions not being called
* Bind EditorSpatialGizmo::clear method
Diffstat (limited to 'tools/editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 91a347c69b..a70df78697 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -77,21 +77,30 @@ void SpatialEditorViewport::_update_camera() { String SpatialEditorGizmo::get_handle_name(int p_idx) const { + if (get_script_instance() && get_script_instance()->has_method("get_handle_name")) + return get_script_instance()->call("get_handle_name", p_idx); + return ""; } Variant SpatialEditorGizmo::get_handle_value(int p_idx) const{ + if (get_script_instance() && get_script_instance()->has_method("get_handle_value")) + return get_script_instance()->call("get_handle_value", p_idx); + return Variant(); } void SpatialEditorGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_point) { + if (get_script_instance() && get_script_instance()->has_method("set_handle")) + get_script_instance()->call("set_handle", p_idx, p_camera, p_point); } void SpatialEditorGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_cancel){ - + if (get_script_instance() && get_script_instance()->has_method("commit_handle")) + get_script_instance()->call("commit_handle", p_idx, p_restore, p_cancel); } bool SpatialEditorGizmo::intersect_frustum(const Camera *p_camera,const Vector<Plane> &p_frustum) { |