You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include "scene/main/viewport.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 = NULL;
|
||||
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();
|
||||
|
||||
Skeleton *skeleton = Object::cast_to<Skeleton>(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<Texture> t = get_icon("Clear", "EditorIcons");
|
||||
clear->set_icon(t);
|
||||
@@ -248,14 +239,12 @@ void EditorPropertyRootMotion::_notification(int p_what) {
|
||||
}
|
||||
|
||||
void EditorPropertyRootMotion::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_confirmed"), &EditorPropertyRootMotion::_confirmed);
|
||||
ClassDB::bind_method(D_METHOD("_node_assign"), &EditorPropertyRootMotion::_node_assign);
|
||||
ClassDB::bind_method(D_METHOD("_node_clear"), &EditorPropertyRootMotion::_node_clear);
|
||||
}
|
||||
|
||||
EditorPropertyRootMotion::EditorPropertyRootMotion() {
|
||||
|
||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
add_child(hbc);
|
||||
assign = memnew(Button);
|
||||
@@ -293,7 +282,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) {
|
||||
|
||||
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