You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +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 "editor/plugins/node_3d_editor_plugin.h"
|
||||
|
||||
void CPUParticles3DEditor::_node_removed(Node *p_node) {
|
||||
|
||||
if (p_node == node) {
|
||||
node = nullptr;
|
||||
hide();
|
||||
@@ -41,24 +40,19 @@ void CPUParticles3DEditor::_node_removed(Node *p_node) {
|
||||
}
|
||||
|
||||
void CPUParticles3DEditor::_notification(int p_notification) {
|
||||
|
||||
if (p_notification == NOTIFICATION_ENTER_TREE) {
|
||||
options->set_icon(get_theme_icon("CPUParticles3D", "EditorIcons"));
|
||||
}
|
||||
}
|
||||
|
||||
void CPUParticles3DEditor::_menu_option(int p_option) {
|
||||
|
||||
switch (p_option) {
|
||||
|
||||
case MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE: {
|
||||
|
||||
emission_tree_dialog->popup_centered_ratio();
|
||||
|
||||
} break;
|
||||
|
||||
case MENU_OPTION_RESTART: {
|
||||
|
||||
node->restart();
|
||||
|
||||
} break;
|
||||
@@ -66,13 +60,11 @@ void CPUParticles3DEditor::_menu_option(int p_option) {
|
||||
}
|
||||
|
||||
void CPUParticles3DEditor::edit(CPUParticles3D *p_particles) {
|
||||
|
||||
base_node = p_particles;
|
||||
node = p_particles;
|
||||
}
|
||||
|
||||
void CPUParticles3DEditor::_generate_emission_points() {
|
||||
|
||||
/// hacer codigo aca
|
||||
Vector<Vector3> points;
|
||||
Vector<Vector3> normals;
|
||||
@@ -95,7 +87,6 @@ void CPUParticles3DEditor::_bind_methods() {
|
||||
}
|
||||
|
||||
CPUParticles3DEditor::CPUParticles3DEditor() {
|
||||
|
||||
particles_editor_hb = memnew(HBoxContainer);
|
||||
Node3DEditor::get_singleton()->add_control_to_menu_panel(particles_editor_hb);
|
||||
options = memnew(MenuButton);
|
||||
@@ -110,17 +101,14 @@ CPUParticles3DEditor::CPUParticles3DEditor() {
|
||||
}
|
||||
|
||||
void CPUParticles3DEditorPlugin::edit(Object *p_object) {
|
||||
|
||||
particles_editor->edit(Object::cast_to<CPUParticles3D>(p_object));
|
||||
}
|
||||
|
||||
bool CPUParticles3DEditorPlugin::handles(Object *p_object) const {
|
||||
|
||||
return p_object->is_class("CPUParticles3D");
|
||||
}
|
||||
|
||||
void CPUParticles3DEditorPlugin::make_visible(bool p_visible) {
|
||||
|
||||
if (p_visible) {
|
||||
particles_editor->show();
|
||||
particles_editor->particles_editor_hb->show();
|
||||
@@ -132,7 +120,6 @@ void CPUParticles3DEditorPlugin::make_visible(bool p_visible) {
|
||||
}
|
||||
|
||||
CPUParticles3DEditorPlugin::CPUParticles3DEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
editor = p_node;
|
||||
particles_editor = memnew(CPUParticles3DEditor);
|
||||
editor->get_viewport()->add_child(particles_editor);
|
||||
|
||||
Reference in New Issue
Block a user