summaryrefslogtreecommitdiff
path: root/tools/editor/editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/editor_plugin.cpp')
-rw-r--r--tools/editor/editor_plugin.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp
index 4b82d5e59c..106e91348e 100644
--- a/tools/editor/editor_plugin.cpp
+++ b/tools/editor/editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -76,6 +76,11 @@ Control * EditorPlugin::get_editor_viewport() {
return EditorNode::get_singleton()->get_viewport();
}
+void EditorPlugin::edit_resource(const Ref<Resource>& p_resource){
+
+ EditorNode::get_singleton()->edit_resource(p_resource);
+}
+
void EditorPlugin::add_control_to_container(CustomControlContainer p_location,Control *p_control) {
switch(p_location) {
@@ -370,6 +375,7 @@ void EditorPlugin::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_selection:EditorSelection"),&EditorPlugin::get_selection);
ObjectTypeDB::bind_method(_MD("get_editor_settings:EditorSettings"),&EditorPlugin::get_editor_settings);
ObjectTypeDB::bind_method(_MD("queue_save_layout"),&EditorPlugin::queue_save_layout);
+ ObjectTypeDB::bind_method(_MD("edit_resource"),&EditorPlugin::edit_resource);
ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"forward_canvas_input_event",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::INPUT_EVENT,"event")));
ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("forward_draw_over_canvas",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::OBJECT,"canvas:Control")));