You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +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,7 +33,6 @@
|
||||
#include "node_3d_editor_plugin.h"
|
||||
|
||||
void Camera3DEditor::_node_removed(Node *p_node) {
|
||||
|
||||
if (p_node == node) {
|
||||
node = nullptr;
|
||||
Node3DEditor::get_singleton()->set_custom_camera(nullptr);
|
||||
@@ -42,7 +41,6 @@ void Camera3DEditor::_node_removed(Node *p_node) {
|
||||
}
|
||||
|
||||
void Camera3DEditor::_pressed() {
|
||||
|
||||
Node *sn = (node && preview->is_pressed()) ? node : nullptr;
|
||||
Node3DEditor::get_singleton()->set_custom_camera(sn);
|
||||
}
|
||||
@@ -51,14 +49,12 @@ void Camera3DEditor::_bind_methods() {
|
||||
}
|
||||
|
||||
void Camera3DEditor::edit(Node *p_camera) {
|
||||
|
||||
node = p_camera;
|
||||
|
||||
if (!node) {
|
||||
preview->set_pressed(false);
|
||||
Node3DEditor::get_singleton()->set_custom_camera(nullptr);
|
||||
} else {
|
||||
|
||||
if (preview->is_pressed())
|
||||
Node3DEditor::get_singleton()->set_custom_camera(p_camera);
|
||||
else
|
||||
@@ -67,7 +63,6 @@ void Camera3DEditor::edit(Node *p_camera) {
|
||||
}
|
||||
|
||||
Camera3DEditor::Camera3DEditor() {
|
||||
|
||||
preview = memnew(Button);
|
||||
add_child(preview);
|
||||
|
||||
@@ -83,18 +78,15 @@ Camera3DEditor::Camera3DEditor() {
|
||||
}
|
||||
|
||||
void Camera3DEditorPlugin::edit(Object *p_object) {
|
||||
|
||||
Node3DEditor::get_singleton()->set_can_preview(Object::cast_to<Camera3D>(p_object));
|
||||
//camera_editor->edit(Object::cast_to<Node>(p_object));
|
||||
}
|
||||
|
||||
bool Camera3DEditorPlugin::handles(Object *p_object) const {
|
||||
|
||||
return p_object->is_class("Camera3D");
|
||||
}
|
||||
|
||||
void Camera3DEditorPlugin::make_visible(bool p_visible) {
|
||||
|
||||
if (p_visible) {
|
||||
//Node3DEditor::get_singleton()->set_can_preview(Object::cast_to<Camera3D>(p_object));
|
||||
} else {
|
||||
@@ -103,7 +95,6 @@ void Camera3DEditorPlugin::make_visible(bool p_visible) {
|
||||
}
|
||||
|
||||
Camera3DEditorPlugin::Camera3DEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
editor = p_node;
|
||||
/* camera_editor = memnew( CameraEditor );
|
||||
editor->get_viewport()->add_child(camera_editor);
|
||||
|
||||
Reference in New Issue
Block a user