summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-05 10:29:19 +0200
committerGitHub <noreply@github.com>2019-07-05 10:29:19 +0200
commit6e9cb44004b8bd30a5834d06671ccd1c62508bfe (patch)
treee3086f5a8a133dc0630e6f5e4b7065e174977df3 /editor
parenta149e412f75e9eef87e8ff54e21402f90161f65b (diff)
parent0639946c72ba6632bc3b0953d64f644af328e5e6 (diff)
Merge pull request #30282 from neikeq/editor_in_cs_equals_win
Re-write mono module editor code in C#
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_plugin.cpp2
-rw-r--r--editor/editor_plugin.h2
-rw-r--r--editor/editor_settings.cpp2
-rw-r--r--editor/plugins/spatial_editor_plugin.h2
4 files changed, 5 insertions, 3 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 90d6c3a983..c2a845653e 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -220,7 +220,7 @@ EditorSelection *EditorInterface::get_selection() {
return EditorNode::get_singleton()->get_editor_selection();
}
-EditorSettings *EditorInterface::get_editor_settings() {
+Ref<EditorSettings> EditorInterface::get_editor_settings() {
return EditorSettings::get_singleton();
}
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index ec369bbdbb..75c230adb7 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -87,7 +87,7 @@ public:
EditorSelection *get_selection();
//EditorImportExport *get_import_export();
- EditorSettings *get_editor_settings();
+ Ref<EditorSettings> get_editor_settings();
EditorResourcePreview *get_resource_previewer();
EditorFileSystem *get_resource_file_system();
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index ecc63b1a8d..8e8c12ba44 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -1579,6 +1579,8 @@ void EditorSettings::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_recent_dirs"), &EditorSettings::get_recent_dirs);
ADD_SIGNAL(MethodInfo("settings_changed"));
+
+ BIND_CONSTANT(NOTIFICATION_EDITOR_SETTINGS_CHANGED);
}
EditorSettings::EditorSettings() {
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);