You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +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:
@@ -117,7 +117,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
|
||||
_update_tool_erase();
|
||||
|
||||
for (int i = 0; i < points.size(); i++) {
|
||||
|
||||
if (Math::abs(float(points[i] - mb->get_position().x)) < 10 * EDSCALE) {
|
||||
selected_point = i;
|
||||
|
||||
@@ -196,7 +195,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
|
||||
|
||||
Color linecolor = get_theme_color("font_color", "Label");
|
||||
Color linecolor_soft = linecolor;
|
||||
linecolor_soft.a *= 0.5;
|
||||
@@ -227,7 +225,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
|
||||
}
|
||||
|
||||
if (snap->is_pressed()) {
|
||||
|
||||
linecolor_soft.a = linecolor.a * 0.1;
|
||||
|
||||
if (blend_space->get_snap() > 0) {
|
||||
@@ -303,7 +300,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_update_space() {
|
||||
|
||||
if (updating)
|
||||
return;
|
||||
|
||||
@@ -360,7 +356,6 @@ void AnimationNodeBlendSpace1DEditor::_snap_toggled() {
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_file_opened(const String &p_file) {
|
||||
|
||||
file_loaded = ResourceLoader::load(p_file);
|
||||
if (file_loaded.is_valid()) {
|
||||
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
|
||||
@@ -370,7 +365,6 @@ void AnimationNodeBlendSpace1DEditor::_file_opened(const String &p_file) {
|
||||
void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
|
||||
Ref<AnimationRootNode> node;
|
||||
if (p_index == MENU_LOAD_FILE) {
|
||||
|
||||
open_file->clear_filters();
|
||||
List<String> filters;
|
||||
ResourceLoader::get_recognized_extensions_for_type("AnimationRootNode", &filters);
|
||||
@@ -383,7 +377,6 @@ void AnimationNodeBlendSpace1DEditor::_add_menu_type(int p_index) {
|
||||
node = file_loaded;
|
||||
file_loaded.unref();
|
||||
} else if (p_index == MENU_PASTE) {
|
||||
|
||||
node = EditorSettings::get_singleton()->get_resource_clipboard();
|
||||
} else {
|
||||
String type = menu->get_item_metadata(p_index);
|
||||
@@ -432,7 +425,6 @@ void AnimationNodeBlendSpace1DEditor::_add_animation_type(int p_index) {
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_tool_switch(int p_tool) {
|
||||
|
||||
if (p_tool == 0) {
|
||||
tool_erase->show();
|
||||
tool_erase_sep->show();
|
||||
@@ -467,7 +459,6 @@ void AnimationNodeBlendSpace1DEditor::_update_edited_point_pos() {
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_update_tool_erase() {
|
||||
|
||||
bool point_valid = selected_point >= 0 && selected_point < blend_space->get_blend_point_count();
|
||||
tool_erase->set_disabled(!point_valid);
|
||||
|
||||
@@ -522,7 +513,6 @@ void AnimationNodeBlendSpace1DEditor::_edit_point_pos(double) {
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_open_editor() {
|
||||
|
||||
if (selected_point >= 0 && selected_point < blend_space->get_blend_point_count()) {
|
||||
Ref<AnimationNode> an = blend_space->get_blend_point_node(selected_point);
|
||||
ERR_FAIL_COND(an.is_null());
|
||||
@@ -575,13 +565,11 @@ void AnimationNodeBlendSpace1DEditor::_bind_methods() {
|
||||
}
|
||||
|
||||
bool AnimationNodeBlendSpace1DEditor::can_edit(const Ref<AnimationNode> &p_node) {
|
||||
|
||||
Ref<AnimationNodeBlendSpace1D> b1d = p_node;
|
||||
return b1d.is_valid();
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::edit(const Ref<AnimationNode> &p_node) {
|
||||
|
||||
blend_space = p_node;
|
||||
|
||||
if (!blend_space.is_null()) {
|
||||
|
||||
Reference in New Issue
Block a user