summaryrefslogtreecommitdiffstats
path: root/editor/spatial_editor_gizmos.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-29 20:11:07 -0300
committerGitHub <noreply@github.com>2017-08-29 20:11:07 -0300
commit9c3bddfac2d80b0e52b94eeace58dbfd249459e7 (patch)
tree574b87e5335c05699f98fde13d2f8812a7325a73 /editor/spatial_editor_gizmos.cpp
parent1564a146b3ce8140a039eefbfcdaf8a2b8dc728b (diff)
parent8bd92a96a40b6d680c2e416f86fae30757766bf3 (diff)
downloadredot-engine-9c3bddfac2d80b0e52b94eeace58dbfd249459e7.tar.gz
Merge pull request #10745 from neikeq/fix-docdata-and-stuff
DocData and virtual method type hints fixes
Diffstat (limited to 'editor/spatial_editor_gizmos.cpp')
-rw-r--r--editor/spatial_editor_gizmos.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 722f651959..d86b255f38 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -634,9 +634,13 @@ void EditorSpatialGizmo::_bind_methods() {
BIND_VMETHOD(MethodInfo("redraw"));
BIND_VMETHOD(MethodInfo(Variant::STRING, "get_handle_name", PropertyInfo(Variant::INT, "index")));
- BIND_VMETHOD(MethodInfo("get_handle_value:Variant", PropertyInfo(Variant::INT, "index")));
- BIND_VMETHOD(MethodInfo("set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera:Camera"), PropertyInfo(Variant::VECTOR2, "point")));
- MethodInfo cm = MethodInfo("commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore:Variant"), PropertyInfo(Variant::BOOL, "cancel"));
+
+ MethodInfo hvget(Variant::NIL, "get_handle_value", PropertyInfo(Variant::INT, "index"));
+ hvget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
+ BIND_VMETHOD(hvget);
+
+ BIND_VMETHOD(MethodInfo("set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::VECTOR2, "point")));
+ MethodInfo cm = MethodInfo("commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel"));
cm.default_arguments.push_back(false);
BIND_VMETHOD(cm);
}