1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

-Ability to set default import presets for type

-More presets for scene importer
-Option in scene importer to export root nodes as separate scenes
-Fixed MeshInstance preview
This commit is contained in:
Juan Linietsky
2017-07-23 18:48:05 -03:00
parent 380eae2cc0
commit 66009706c9
12 changed files with 348 additions and 223 deletions

View File

@@ -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