You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +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 "scene/main/window.h"
|
||||
|
||||
void EditorPropertyRootMotion::_confirmed() {
|
||||
|
||||
TreeItem *ti = filters->get_selected();
|
||||
if (!ti)
|
||||
return;
|
||||
@@ -45,7 +44,6 @@ void EditorPropertyRootMotion::_confirmed() {
|
||||
}
|
||||
|
||||
void EditorPropertyRootMotion::_node_assign() {
|
||||
|
||||
NodePath current = get_edited_object()->get(get_edited_property());
|
||||
|
||||
AnimationTree *atree = Object::cast_to<AnimationTree>(get_edited_object());
|
||||
@@ -72,7 +70,6 @@ void EditorPropertyRootMotion::_node_assign() {
|
||||
player->get_animation_list(&animations);
|
||||
|
||||
for (List<StringName>::Element *E = animations.front(); E; E = E->next()) {
|
||||
|
||||
Ref<Animation> anim = player->get_animation(E->get());
|
||||
for (int i = 0; i < anim->get_track_count(); i++) {
|
||||
paths.insert(anim->track_get_path(i));
|
||||
@@ -86,7 +83,6 @@ void EditorPropertyRootMotion::_node_assign() {
|
||||
Map<String, TreeItem *> parenthood;
|
||||
|
||||
for (Set<String>::Element *E = paths.front(); E; E = E->next()) {
|
||||
|
||||
NodePath path = E->get();
|
||||
TreeItem *ti = nullptr;
|
||||
String accum;
|
||||
@@ -125,7 +121,6 @@ void EditorPropertyRootMotion::_node_assign() {
|
||||
continue; //no node, can't edit
|
||||
|
||||
if (path.get_subname_count()) {
|
||||
|
||||
String concat = path.get_concatenated_subnames();
|
||||
|
||||
Skeleton3D *skeleton = Object::cast_to<Skeleton3D>(node);
|
||||
@@ -194,13 +189,11 @@ void EditorPropertyRootMotion::_node_assign() {
|
||||
}
|
||||
|
||||
void EditorPropertyRootMotion::_node_clear() {
|
||||
|
||||
emit_changed(get_edited_property(), NodePath());
|
||||
update_property();
|
||||
}
|
||||
|
||||
void EditorPropertyRootMotion::update_property() {
|
||||
|
||||
NodePath p = get_edited_object()->get(get_edited_property());
|
||||
|
||||
assign->set_tooltip(p);
|
||||
@@ -235,12 +228,10 @@ void EditorPropertyRootMotion::update_property() {
|
||||
}
|
||||
|
||||
void EditorPropertyRootMotion::setup(const NodePath &p_base_hint) {
|
||||
|
||||
base_hint = p_base_hint;
|
||||
}
|
||||
|
||||
void EditorPropertyRootMotion::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
|
||||
Ref<Texture2D> t = get_theme_icon("Clear", "EditorIcons");
|
||||
clear->set_icon(t);
|
||||
@@ -251,7 +242,6 @@ void EditorPropertyRootMotion::_bind_methods() {
|
||||
}
|
||||
|
||||
EditorPropertyRootMotion::EditorPropertyRootMotion() {
|
||||
|
||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
add_child(hbc);
|
||||
assign = memnew(Button);
|
||||
@@ -289,7 +279,6 @@ void EditorInspectorRootMotionPlugin::parse_begin(Object *p_object) {
|
||||
}
|
||||
|
||||
bool EditorInspectorRootMotionPlugin::parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide) {
|
||||
|
||||
if (p_path == "root_motion_track" && p_object->is_class("AnimationTree") && p_type == Variant::NODE_PATH) {
|
||||
EditorPropertyRootMotion *editor = memnew(EditorPropertyRootMotion);
|
||||
if (p_hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && p_hint_text != String()) {
|
||||
|
||||
Reference in New Issue
Block a user