From 6fc1c3a4d1cf0c865f7dfdb1221ef07a5d25f305 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 27 Feb 2016 23:10:44 -0300 Subject: Completed the support for plugins! It is not possible to add plugins. Not all APIs are provided yet, please request whathever you are missing. Some example plugins are provided in demos/plugins. Just copy them to a folder in your project named addons/ and then enable them from the project settings. Have fun! --- tools/editor/plugins/path_editor_plugin.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tools/editor/plugins/path_editor_plugin.cpp') diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp index b99e63260..3c4428bdb 100644 --- a/tools/editor/plugins/path_editor_plugin.cpp +++ b/tools/editor/plugins/path_editor_plugin.cpp @@ -267,17 +267,15 @@ PathSpatialGizmo::PathSpatialGizmo(Path* p_path){ } -bool PathEditorPlugin::create_spatial_gizmo(Spatial* p_spatial) { +Ref PathEditorPlugin::create_spatial_gizmo(Spatial* p_spatial) { - if (p_spatial->cast_to()) { + if (p_spatial->cast_to()) { - Ref psg = memnew( PathSpatialGizmo(p_spatial->cast_to())); - p_spatial->set_gizmo(psg); - return true; + return memnew( PathSpatialGizmo(p_spatial->cast_to())); } - return false; + return Ref(); } bool PathEditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) { @@ -538,7 +536,7 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) { path_thin_material->set_flag(Material::FLAG_DOUBLE_SIDED,true); path_thin_material->set_flag(Material::FLAG_UNSHADED,true); - SpatialEditor::get_singleton()->add_gizmo_plugin(this); +// SpatialEditor::get_singleton()->add_gizmo_plugin(this); sep = memnew( VSeparator); sep->hide(); -- cgit v1.2.3-70-g09d2