summaryrefslogtreecommitdiff
path: root/editor/editor_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_plugin.h')
-rw-r--r--editor/editor_plugin.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 05cc6e07e3..1ebddbe2b0 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -31,8 +31,10 @@
#ifndef EDITOR_PLUGIN_H
#define EDITOR_PLUGIN_H
+#include "editor/editor_inspector.h"
#include "editor/import/editor_import_plugin.h"
#include "editor/import/resource_importer_scene.h"
+#include "editor/script_create_dialog.h"
#include "io/config_file.h"
#include "scene/gui/tool_button.h"
#include "scene/main/node.h"
@@ -49,7 +51,6 @@ class Camera;
class EditorSelection;
class EditorExport;
class EditorSettings;
-class SpatialEditorGizmo;
class EditorImportPlugin;
class EditorExportPlugin;
class EditorResourcePreview;
@@ -113,6 +114,7 @@ class EditorPlugin : public Node {
bool force_draw_over_forwarding_enabled;
String last_main_screen_name;
+ String _dir_cache;
protected:
static void _bind_methods();
@@ -125,10 +127,12 @@ public:
enum CustomControlContainer {
CONTAINER_TOOLBAR,
CONTAINER_SPATIAL_EDITOR_MENU,
- CONTAINER_SPATIAL_EDITOR_SIDE,
+ CONTAINER_SPATIAL_EDITOR_SIDE_LEFT,
+ CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT,
CONTAINER_SPATIAL_EDITOR_BOTTOM,
CONTAINER_CANVAS_EDITOR_MENU,
- CONTAINER_CANVAS_EDITOR_SIDE,
+ CONTAINER_CANVAS_EDITOR_SIDE_LEFT,
+ CONTAINER_CANVAS_EDITOR_SIDE_RIGHT,
CONTAINER_CANVAS_EDITOR_BOTTOM,
CONTAINER_PROPERTY_EDITOR_BOTTOM
};
@@ -167,8 +171,8 @@ public:
void notify_main_screen_changed(const String &screen_name);
void notify_scene_changed(const Node *scn_root);
void notify_scene_closed(const String &scene_filepath);
+ void notify_resource_saved(const Ref<Resource> &p_resource);
- virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial *p_spatial);
virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event);
virtual void forward_draw_over_viewport(Control *p_overlay);
virtual void forward_force_draw_over_viewport(Control *p_overlay);
@@ -190,8 +194,10 @@ public:
virtual void set_window_layout(Ref<ConfigFile> p_layout);
virtual void get_window_layout(Ref<ConfigFile> p_layout);
virtual void edited_scene_changed() {} // if changes are pending in editor, apply them
+ virtual bool build(); // builds with external tools. Returns true if safe to continue running scene.
EditorInterface *get_editor_interface();
+ ScriptCreateDialog *get_script_create_dialog();
int update_overlays() const;
@@ -209,12 +215,19 @@ public:
void add_export_plugin(const Ref<EditorExportPlugin> &p_exporter);
void remove_export_plugin(const Ref<EditorExportPlugin> &p_exporter);
+ void add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);
+ void remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin);
+
void add_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer);
void remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer);
void add_autoload_singleton(const String &p_name, const String &p_path);
void remove_autoload_singleton(const String &p_name);
+ void set_dir_cache(const String &p_dir) { _dir_cache = p_dir; }
+ String get_dir_cache() { return _dir_cache; }
+ Ref<ConfigFile> get_config();
+
EditorPlugin();
virtual ~EditorPlugin();
};