You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
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,12 +102,10 @@ void MeshEditor::_button_pressed(Node *p_button) {
|
||||
}
|
||||
|
||||
void MeshEditor::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_gui_input"), &MeshEditor::_gui_input);
|
||||
}
|
||||
|
||||
MeshEditor::MeshEditor() {
|
||||
|
||||
viewport = memnew(SubViewport);
|
||||
Ref<World3D> world_3d;
|
||||
world_3d.instance();
|
||||
@@ -172,12 +163,10 @@ MeshEditor::MeshEditor() {
|
||||
///////////////////////
|
||||
|
||||
bool EditorInspectorPluginMesh::can_handle(Object *p_object) {
|
||||
|
||||
return Object::cast_to<Mesh>(p_object) != nullptr;
|
||||
}
|
||||
|
||||
void EditorInspectorPluginMesh::parse_begin(Object *p_object) {
|
||||
|
||||
Mesh *mesh = Object::cast_to<Mesh>(p_object);
|
||||
if (!mesh) {
|
||||
return;
|
||||
@@ -190,7 +179,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