diff options
| author | Juan Linietsky | 2017-07-23 18:48:05 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-07-23 18:50:25 -0300 |
| commit | 66009706c92671898b49a8a88cc626926b7a2d2c (patch) | |
| tree | 97aea718b2e6fbc413dcbd08beca1f59dee35504 /editor/plugins/mesh_editor_plugin.h | |
| parent | 380eae2cc0a7474ae46ed114ad6f12be35f40b90 (diff) | |
| download | godot-66009706c92671898b49a8a88cc626926b7a2d2c.tar.gz godot-66009706c92671898b49a8a88cc626926b7a2d2c.tar.zst godot-66009706c92671898b49a8a88cc626926b7a2d2c.zip | |
Diffstat (limited to 'editor/plugins/mesh_editor_plugin.h')
| -rw-r--r-- | editor/plugins/mesh_editor_plugin.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h index 1d89448ed..72d93c412 100644 --- a/editor/plugins/mesh_editor_plugin.h +++ b/editor/plugins/mesh_editor_plugin.h @@ -30,8 +30,6 @@ #ifndef MESH_EDITOR_PLUGIN_H #define MESH_EDITOR_PLUGIN_H -#if 0 - #include "editor/editor_node.h" #include "editor/editor_plugin.h" #include "scene/3d/camera.h" @@ -39,51 +37,48 @@ #include "scene/3d/mesh_instance.h" #include "scene/resources/material.h" -class MeshEditor : public Control { - - GDCLASS(MeshEditor, Control); - +class MeshEditor : public ViewportContainer { + GDCLASS(MeshEditor, ViewportContainer); float rot_x; float rot_y; Viewport *viewport; MeshInstance *mesh_instance; + Spatial *rotation; DirectionalLight *light1; DirectionalLight *light2; Camera *camera; Ref<Mesh> mesh; - TextureButton *light_1_switch; TextureButton *light_2_switch; - void _button_pressed(Node* p_button); + void _button_pressed(Node *p_button); bool first_enter; void _update_rotation(); + protected: void _notification(int p_what); - void _gui_input(InputEvent p_event); + void _gui_input(Ref<InputEvent> p_event); static void _bind_methods(); -public: +public: void edit(Ref<Mesh> p_mesh); MeshEditor(); }; - class MeshEditorPlugin : public EditorPlugin { - GDCLASS( MeshEditorPlugin, EditorPlugin ); + GDCLASS(MeshEditorPlugin, EditorPlugin); MeshEditor *mesh_editor; EditorNode *editor; public: - virtual String get_name() const { return "Mesh"; } bool has_main_screen() const { return false; } virtual void edit(Object *p_node); @@ -92,8 +87,6 @@ public: MeshEditorPlugin(EditorNode *p_node); ~MeshEditorPlugin(); - }; -#endif // MESH_EDITOR_PLUGIN_H #endif |
