diff options
| author | Juan Linietsky | 2016-09-10 15:32:17 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-09-10 15:32:17 -0300 |
| commit | 67d3935eb17110d71235f52d1b2040f06c8f2b23 (patch) | |
| tree | 01c274accfca2d1a698c38ebfb169c92982fc70c /tools/editor/editor_plugin.cpp | |
| parent | 75f292f8eb1d5afa9c29817e8cb9401ab5fa166f (diff) | |
| download | godot-67d3935eb17110d71235f52d1b2040f06c8f2b23.tar.gz godot-67d3935eb17110d71235f52d1b2040f06c8f2b23.tar.zst godot-67d3935eb17110d71235f52d1b2040f06c8f2b23.zip | |
-Added way to generate resource previews from script plugin.
-Updated documentation
Diffstat (limited to 'tools/editor/editor_plugin.cpp')
| -rw-r--r-- | tools/editor/editor_plugin.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp index fa5de096e..752e961c8 100644 --- a/tools/editor/editor_plugin.cpp +++ b/tools/editor/editor_plugin.cpp @@ -32,6 +32,7 @@ #include "plugins/spatial_editor_plugin.h" #include "tools/editor/editor_node.h" #include "tools/editor/editor_settings.h" +#include "editor_resource_preview.h" void EditorPlugin::add_custom_type(const String& p_type, const String& p_base,const Ref<Script>& p_script, const Ref<Texture>& p_icon) { @@ -272,6 +273,10 @@ EditorSettings *EditorPlugin::get_editor_settings() { return EditorSettings::get_singleton(); } +EditorResourcePreview *EditorPlugin::get_resource_previewer() { + return EditorResourcePreview::get_singleton(); +} + void EditorPlugin::add_import_plugin(const Ref<EditorImportPlugin>& p_editor_import) { EditorNode::get_singleton()->add_editor_import_plugin(p_editor_import); @@ -319,6 +324,8 @@ void EditorPlugin::_bind_methods() { ObjectTypeDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::add_export_plugin); ObjectTypeDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::remove_export_plugin); + ObjectTypeDB::bind_method(_MD("get_resource_previewer:EditorResourcePreview"),&EditorPlugin::get_resource_previewer); + ObjectTypeDB::bind_method(_MD("inspect_object","object","for_property"),&EditorPlugin::inspect_object,DEFVAL(String())); ObjectTypeDB::bind_method(_MD("get_base_control:Control"),&EditorPlugin::get_base_control); |
