summaryrefslogtreecommitdiffstats
path: root/editor/editor_plugin.cpp
diff options
context:
space:
mode:
authorWill Nations <willnationsdev@gmail.com>2018-01-12 15:43:29 -0600
committerWill Nations <willnationsdev@gmail.com>2018-01-31 09:06:09 -0600
commit80595ba92b089de6c22ef0ca17b11054a252587c (patch)
treec618026e30a8b2336bf83ded03db6cf4f16d0cb3 /editor/editor_plugin.cpp
parent920715b97db4f3d63dfdc0f38141ce842a9bad63 (diff)
downloadredot-engine-80595ba92b089de6c22ef0ca17b11054a252587c.tar.gz
Added EditorPlugin 'resource_saved' signal
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r--editor/editor_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 9dd8a7232f..df1e37a0d6 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -410,6 +410,10 @@ void EditorPlugin::notify_scene_closed(const String &scene_filepath) {
emit_signal("scene_closed", scene_filepath);
}
+void EditorPlugin::notify_resource_saved(const Ref<Resource> &p_resource) {
+ emit_signal("resource_saved", p_resource);
+}
+
Ref<SpatialEditorGizmo> EditorPlugin::create_spatial_gizmo(Spatial *p_spatial) {
//??
if (get_script_instance() && get_script_instance()->has_method("create_spatial_gizmo")) {
@@ -690,6 +694,7 @@ void EditorPlugin::_bind_methods() {
ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath")));
ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name")));
+ ADD_SIGNAL(MethodInfo("resource_saved", PropertyInfo(Variant::OBJECT, "resource", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR);
BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);