You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -48,7 +48,6 @@
|
||||
#include "scene/scene_string_names.h"
|
||||
|
||||
void AnimationTreeEditor::edit(AnimationTree *p_tree) {
|
||||
|
||||
if (tree == p_tree)
|
||||
return;
|
||||
|
||||
@@ -64,7 +63,6 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) {
|
||||
}
|
||||
|
||||
void AnimationTreeEditor::_path_button_pressed(int p_path) {
|
||||
|
||||
edited_path.clear();
|
||||
for (int i = 0; i <= p_path; i++) {
|
||||
edited_path.push_back(button_path[i]);
|
||||
@@ -100,7 +98,6 @@ void AnimationTreeEditor::_update_path() {
|
||||
}
|
||||
|
||||
void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
|
||||
|
||||
button_path.clear();
|
||||
|
||||
Ref<AnimationNode> node = tree->get_tree_root();
|
||||
@@ -109,7 +106,6 @@ void AnimationTreeEditor::edit_path(const Vector<String> &p_path) {
|
||||
current_root = node->get_instance_id();
|
||||
|
||||
for (int i = 0; i < p_path.size(); i++) {
|
||||
|
||||
Ref<AnimationNode> child = node->get_child_by_name(p_path[i]);
|
||||
ERR_BREAK(child.is_null());
|
||||
node = child;
|
||||
@@ -140,7 +136,6 @@ Vector<String> AnimationTreeEditor::get_edited_path() const {
|
||||
}
|
||||
|
||||
void AnimationTreeEditor::enter_editor(const String &p_path) {
|
||||
|
||||
Vector<String> path = edited_path;
|
||||
path.push_back(p_path);
|
||||
edit_path(path);
|
||||
@@ -204,7 +199,6 @@ bool AnimationTreeEditor::can_edit(const Ref<AnimationNode> &p_node) const {
|
||||
}
|
||||
|
||||
Vector<String> AnimationTreeEditor::get_animation_list() {
|
||||
|
||||
if (!singleton->is_visible()) {
|
||||
return Vector<String>();
|
||||
}
|
||||
@@ -229,7 +223,6 @@ Vector<String> AnimationTreeEditor::get_animation_list() {
|
||||
}
|
||||
|
||||
AnimationTreeEditor::AnimationTreeEditor() {
|
||||
|
||||
AnimationNodeAnimation::get_editable_animation_list = get_animation_list;
|
||||
path_edit = memnew(ScrollContainer);
|
||||
add_child(path_edit);
|
||||
@@ -253,17 +246,14 @@ AnimationTreeEditor::AnimationTreeEditor() {
|
||||
}
|
||||
|
||||
void AnimationTreeEditorPlugin::edit(Object *p_object) {
|
||||
|
||||
anim_tree_editor->edit(Object::cast_to<AnimationTree>(p_object));
|
||||
}
|
||||
|
||||
bool AnimationTreeEditorPlugin::handles(Object *p_object) const {
|
||||
|
||||
return p_object->is_class("AnimationTree");
|
||||
}
|
||||
|
||||
void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
|
||||
|
||||
if (p_visible) {
|
||||
//editor->hide_animation_player_editors();
|
||||
//editor->animation_panel_make_visible(true);
|
||||
@@ -271,7 +261,6 @@ void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
|
||||
editor->make_bottom_panel_item_visible(anim_tree_editor);
|
||||
anim_tree_editor->set_process(true);
|
||||
} else {
|
||||
|
||||
if (anim_tree_editor->is_visible_in_tree())
|
||||
editor->hide_bottom_panel();
|
||||
button->hide();
|
||||
@@ -280,7 +269,6 @@ void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
|
||||
}
|
||||
|
||||
AnimationTreeEditorPlugin::AnimationTreeEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
editor = p_node;
|
||||
anim_tree_editor = memnew(AnimationTreeEditor);
|
||||
anim_tree_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
|
||||
|
||||
Reference in New Issue
Block a user