You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
This commit is contained in:
@@ -33,10 +33,8 @@
|
||||
#include "editor/editor_scale.h"
|
||||
|
||||
void MeshEditor::_gui_input(Ref<InputEvent> p_event) {
|
||||
|
||||
Ref<InputEventMouseMotion> mm = p_event;
|
||||
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
|
||||
|
||||
rot_x -= mm->get_relative().y * 0.01;
|
||||
rot_y -= mm->get_relative().x * 0.01;
|
||||
if (rot_x < -Math_PI / 2)
|
||||
@@ -49,9 +47,7 @@ void MeshEditor::_gui_input(Ref<InputEvent> p_event) {
|
||||
}
|
||||
|
||||
void MeshEditor::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
|
||||
//get_scene()->connect("node_removed",this,"_node_removed");
|
||||
|
||||
if (first_enter) {
|
||||
@@ -67,7 +63,6 @@ void MeshEditor::_notification(int p_what) {
|
||||
}
|
||||
|
||||
void MeshEditor::_update_rotation() {
|
||||
|
||||
Transform t;
|
||||
t.basis.rotate(Vector3(0, 1, 0), -rot_y);
|
||||
t.basis.rotate(Vector3(1, 0, 0), -rot_x);
|
||||
@@ -75,7 +70,6 @@ void MeshEditor::_update_rotation() {
|
||||
}
|
||||
|
||||
void MeshEditor::edit(Ref<Mesh> p_mesh) {
|
||||
|
||||
mesh = p_mesh;
|
||||
mesh_instance->set_mesh(mesh);
|
||||
|
||||
@@ -98,7 +92,6 @@ void MeshEditor::edit(Ref<Mesh> p_mesh) {
|
||||
}
|
||||
|
||||
void MeshEditor::_button_pressed(Node *p_button) {
|
||||
|
||||
if (p_button == light_1_switch) {
|
||||
light1->set_visible(!light_1_switch->is_pressed());
|
||||
}
|
||||
@@ -109,13 +102,11 @@ void MeshEditor::_button_pressed(Node *p_button) {
|
||||
}
|
||||
|
||||
void MeshEditor::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_gui_input"), &MeshEditor::_gui_input);
|
||||
ClassDB::bind_method(D_METHOD("_button_pressed"), &MeshEditor::_button_pressed);
|
||||
}
|
||||
|
||||
MeshEditor::MeshEditor() {
|
||||
|
||||
viewport = memnew(Viewport);
|
||||
Ref<World> world;
|
||||
world.instance();
|
||||
@@ -173,12 +164,10 @@ MeshEditor::MeshEditor() {
|
||||
///////////////////////
|
||||
|
||||
bool EditorInspectorPluginMesh::can_handle(Object *p_object) {
|
||||
|
||||
return Object::cast_to<Mesh>(p_object) != NULL;
|
||||
}
|
||||
|
||||
void EditorInspectorPluginMesh::parse_begin(Object *p_object) {
|
||||
|
||||
Mesh *mesh = Object::cast_to<Mesh>(p_object);
|
||||
if (!mesh) {
|
||||
return;
|
||||
@@ -191,7 +180,6 @@ void EditorInspectorPluginMesh::parse_begin(Object *p_object) {
|
||||
}
|
||||
|
||||
MeshEditorPlugin::MeshEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
Ref<EditorInspectorPluginMesh> plugin;
|
||||
plugin.instance();
|
||||
add_inspector_plugin(plugin);
|
||||
|
||||
Reference in New Issue
Block a user