Style: Fix issues that went past CI
This commit is contained in:
parent
a319d72071
commit
404ee1a56b
|
@ -8,7 +8,6 @@ StringName AnimationNodeBlendSpace1DEditor::get_blend_position_path() const {
|
|||
return path;
|
||||
}
|
||||
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEvent> &p_event) {
|
||||
Ref<InputEventKey> k = p_event;
|
||||
|
||||
|
@ -258,7 +257,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_draw() {
|
|||
|
||||
float point = AnimationTreeEditor::get_singleton()->get_tree()->get(get_blend_position_path());
|
||||
|
||||
|
||||
point = (point - blend_space->get_min_space()) / (blend_space->get_max_space() - blend_space->get_min_space());
|
||||
point *= s.width;
|
||||
|
||||
|
@ -501,8 +499,6 @@ void AnimationNodeBlendSpace1DEditor::_open_editor() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
|
||||
error_panel->add_style_override("panel", get_stylebox("bg", "Tree"));
|
||||
|
@ -514,7 +510,6 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
|
|||
tool_erase->set_icon(get_icon("Remove", "EditorIcons"));
|
||||
snap->set_icon(get_icon("SnapGrid", "EditorIcons"));
|
||||
open_editor->set_icon(get_icon("Edit", "EditorIcons"));
|
||||
|
||||
}
|
||||
|
||||
if (p_what == NOTIFICATION_PROCESS) {
|
||||
|
@ -561,9 +556,6 @@ void AnimationNodeBlendSpace1DEditor::_bind_methods() {
|
|||
ClassDB::bind_method("_open_editor", &AnimationNodeBlendSpace1DEditor::_open_editor);
|
||||
|
||||
ClassDB::bind_method("_file_opened", &AnimationNodeBlendSpace1DEditor::_file_opened);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool AnimationNodeBlendSpace1DEditor::can_edit(const Ref<AnimationNode> &p_node) {
|
||||
|
@ -574,8 +566,6 @@ bool AnimationNodeBlendSpace1DEditor::can_edit(const Ref<AnimationNode> &p_node)
|
|||
|
||||
void AnimationNodeBlendSpace1DEditor::edit(const Ref<AnimationNode> &p_node) {
|
||||
|
||||
|
||||
|
||||
blend_space = p_node;
|
||||
|
||||
if (!blend_space.is_null()) {
|
||||
|
@ -595,7 +585,6 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
Ref<ButtonGroup> bg;
|
||||
bg.instance();
|
||||
|
||||
|
||||
tool_blend = memnew(ToolButton);
|
||||
tool_blend->set_toggle_mode(true);
|
||||
tool_blend->set_button_group(bg);
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/plugins/animation_tree_editor_plugin.h"
|
||||
#include "editor/property_editor.h"
|
||||
#include "scene/animation/animation_blend_space_1d.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "editor/plugins/animation_tree_editor_plugin.h"
|
||||
|
||||
class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
|
||||
|
||||
|
|
|
@ -85,7 +85,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
menu->add_separator();
|
||||
menu->add_item(TTR("Load.."), MENU_LOAD_FILE);
|
||||
|
||||
|
||||
menu->set_global_position(blend_space_draw->get_global_transform().xform(mb->get_position()));
|
||||
menu->popup();
|
||||
add_point_pos = (mb->get_position() / blend_space_draw->get_size());
|
||||
|
@ -755,7 +754,6 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void AnimationNodeBlendSpace2DEditor::_open_editor() {
|
||||
|
||||
if (selected_point >= 0 && selected_point < blend_space->get_blend_point_count()) {
|
||||
|
@ -804,7 +802,6 @@ void AnimationNodeBlendSpace2DEditor::_bind_methods() {
|
|||
ClassDB::bind_method("_auto_triangles_toggled", &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled);
|
||||
|
||||
ClassDB::bind_method("_file_opened", &AnimationNodeBlendSpace2DEditor::_file_opened);
|
||||
|
||||
}
|
||||
|
||||
AnimationNodeBlendSpace2DEditor *AnimationNodeBlendSpace2DEditor::singleton = NULL;
|
||||
|
@ -1019,4 +1016,3 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
dragging_selected = false;
|
||||
dragging_selected_attempt = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/plugins/animation_tree_editor_plugin.h"
|
||||
#include "editor/property_editor.h"
|
||||
#include "scene/animation/animation_blend_space_2d.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/popup.h"
|
||||
#include "scene/gui/tree.h"
|
||||
#include "editor/plugins/animation_tree_editor_plugin.h"
|
||||
/**
|
||||
@author Juan Linietsky <reduzio@gmail.com>
|
||||
*/
|
||||
|
@ -20,7 +20,6 @@ class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
|
|||
|
||||
Ref<AnimationNodeBlendSpace2D> blend_space;
|
||||
|
||||
|
||||
PanelContainer *panel;
|
||||
ToolButton *tool_blend;
|
||||
ToolButton *tool_select;
|
||||
|
@ -119,5 +118,4 @@ public:
|
|||
AnimationNodeBlendSpace2DEditor();
|
||||
};
|
||||
|
||||
|
||||
#endif // ANIMATION_BLEND_SPACE_2D_EDITOR_H
|
||||
|
|
|
@ -95,7 +95,6 @@ class ThreadLocal {
|
|||
memdelete(static_cast<T *>(tls_data));
|
||||
}
|
||||
|
||||
|
||||
T *_tls_get_value() const {
|
||||
void *tls_data = storage.get_value();
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "animation_blend_space_1d.h"
|
||||
|
||||
|
||||
void AnimationNodeBlendSpace1D::get_parameter_list(List<PropertyInfo> *r_list) const {
|
||||
r_list->push_back(PropertyInfo(Variant::REAL, blend_position));
|
||||
}
|
||||
|
@ -93,8 +92,6 @@ void AnimationNodeBlendSpace1D::add_blend_point(const Ref<AnimationRootNode> &p_
|
|||
|
||||
blend_points_used++;
|
||||
emit_signal("tree_changed");
|
||||
|
||||
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace1D::set_blend_point_position(int p_point, float p_position) {
|
||||
|
@ -115,7 +112,6 @@ void AnimationNodeBlendSpace1D::set_blend_point_node(int p_point, const Ref<Anim
|
|||
blend_points[p_point].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
|
||||
|
||||
emit_signal("tree_changed");
|
||||
|
||||
}
|
||||
|
||||
float AnimationNodeBlendSpace1D::get_blend_point_position(int p_point) const {
|
||||
|
@ -137,10 +133,8 @@ void AnimationNodeBlendSpace1D::remove_blend_point(int p_point) {
|
|||
blend_points[i] = blend_points[i + 1];
|
||||
}
|
||||
|
||||
|
||||
blend_points_used--;
|
||||
emit_signal("tree_changed");
|
||||
|
||||
}
|
||||
|
||||
int AnimationNodeBlendSpace1D::get_blend_point_count() const {
|
||||
|
@ -180,7 +174,6 @@ float AnimationNodeBlendSpace1D::get_snap() const {
|
|||
return snap;
|
||||
}
|
||||
|
||||
|
||||
void AnimationNodeBlendSpace1D::set_value_label(const String &p_label) {
|
||||
value_label = p_label;
|
||||
}
|
||||
|
@ -203,7 +196,6 @@ float AnimationNodeBlendSpace1D::process(float p_time, bool p_seek) {
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
if (blend_points_used == 1) {
|
||||
// only one point available, just play that animation
|
||||
return blend_node(blend_points[0].name, blend_points[0].node, p_time, p_seek, 1.0, FILTER_IGNORE, false);
|
||||
|
@ -305,5 +297,4 @@ AnimationNodeBlendSpace1D::AnimationNodeBlendSpace1D() {
|
|||
}
|
||||
|
||||
AnimationNodeBlendSpace1D::~AnimationNodeBlendSpace1D() {
|
||||
|
||||
}
|
||||
|
|
|
@ -37,13 +37,11 @@ protected:
|
|||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
|
||||
virtual void get_parameter_list(List<PropertyInfo> *r_list) const;
|
||||
virtual Variant get_parameter_default_value(const StringName &p_parameter) const;
|
||||
|
||||
virtual void get_child_nodes(List<ChildNode> *r_child_nodes);
|
||||
|
||||
|
||||
void add_blend_point(const Ref<AnimationRootNode> &p_node, float p_position, int p_at_index = -1);
|
||||
void set_blend_point_position(int p_point, float p_position);
|
||||
void set_blend_point_node(int p_point, const Ref<AnimationRootNode> &p_node);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "animation_blend_space_2d.h"
|
||||
#include "math/delaunay.h"
|
||||
|
||||
|
||||
void AnimationNodeBlendSpace2D::get_parameter_list(List<PropertyInfo> *r_list) const {
|
||||
r_list->push_back(PropertyInfo(Variant::VECTOR2, blend_position));
|
||||
}
|
||||
|
@ -9,7 +8,6 @@ Variant AnimationNodeBlendSpace2D::get_parameter_default_value(const StringName
|
|||
return Vector2();
|
||||
}
|
||||
|
||||
|
||||
void AnimationNodeBlendSpace2D::get_child_nodes(List<ChildNode> *r_child_nodes) {
|
||||
for (int i = 0; i < blend_points_used; i++) {
|
||||
ChildNode cn;
|
||||
|
@ -44,12 +42,10 @@ void AnimationNodeBlendSpace2D::add_blend_point(const Ref<AnimationRootNode> &p_
|
|||
blend_points[p_at_index].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
|
||||
blend_points_used++;
|
||||
|
||||
|
||||
if (auto_triangles) {
|
||||
trianges_dirty = true;
|
||||
}
|
||||
emit_signal("tree_changed");
|
||||
|
||||
}
|
||||
|
||||
void AnimationNodeBlendSpace2D::set_blend_point_position(int p_point, const Vector2 &p_position) {
|
||||
|
@ -70,7 +66,6 @@ void AnimationNodeBlendSpace2D::set_blend_point_node(int p_point, const Ref<Anim
|
|||
blend_points[p_point].node->connect("tree_changed", this, "_tree_changed", varray(), CONNECT_REFERENCE_COUNTED);
|
||||
|
||||
emit_signal("tree_changed");
|
||||
|
||||
}
|
||||
Vector2 AnimationNodeBlendSpace2D::get_blend_point_position(int p_point) const {
|
||||
ERR_FAIL_INDEX_V(p_point, blend_points_used, Vector2());
|
||||
|
@ -107,7 +102,6 @@ void AnimationNodeBlendSpace2D::remove_blend_point(int p_point) {
|
|||
}
|
||||
blend_points_used--;
|
||||
emit_signal("tree_changed");
|
||||
|
||||
}
|
||||
|
||||
int AnimationNodeBlendSpace2D::get_blend_point_count() const {
|
||||
|
@ -491,7 +485,6 @@ void AnimationNodeBlendSpace2D::set_auto_triangles(bool p_enable) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
bool AnimationNodeBlendSpace2D::get_auto_triangles() const {
|
||||
return auto_triangles;
|
||||
}
|
||||
|
@ -577,6 +570,4 @@ AnimationNodeBlendSpace2D::AnimationNodeBlendSpace2D() {
|
|||
}
|
||||
|
||||
AnimationNodeBlendSpace2D::~AnimationNodeBlendSpace2D() {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -45,13 +45,11 @@ class AnimationNodeBlendSpace2D : public AnimationRootNode {
|
|||
|
||||
void _tree_changed();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void _validate_property(PropertyInfo &property) const;
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
|
||||
virtual void get_parameter_list(List<PropertyInfo> *r_list) const;
|
||||
virtual Variant get_parameter_default_value(const StringName &p_parameter) const;
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
#include "scene/scene_string_names.h"
|
||||
#include "servers/audio/audio_stream.h"
|
||||
|
||||
|
||||
|
||||
void AnimationNode::get_parameter_list(List<PropertyInfo> *r_list) const {
|
||||
|
||||
}
|
||||
|
||||
Variant AnimationNode::get_parameter_default_value(const StringName &p_parameter) const {
|
||||
|
@ -34,7 +31,6 @@ Variant AnimationNode::get_parameter(const StringName& p_name) const {
|
|||
}
|
||||
|
||||
void AnimationNode::get_child_nodes(List<ChildNode> *r_child_nodes) {
|
||||
|
||||
}
|
||||
|
||||
void AnimationNode::blend_animation(const StringName &p_animation, float p_time, float p_delta, bool p_seeked, float p_blend) {
|
||||
|
@ -247,7 +243,6 @@ String AnimationNode::get_input_name(int p_input) {
|
|||
return inputs[p_input].name;
|
||||
}
|
||||
|
||||
|
||||
String AnimationNode::get_caption() const {
|
||||
|
||||
if (get_script_instance()) {
|
||||
|
@ -313,8 +308,6 @@ bool AnimationNode::has_filter() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Array AnimationNode::_get_filters() const {
|
||||
|
||||
Array paths;
|
||||
|
@ -358,7 +351,6 @@ void AnimationNode::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_filter_enabled", "enable"), &AnimationNode::set_filter_enabled);
|
||||
ClassDB::bind_method(D_METHOD("is_filter_enabled"), &AnimationNode::is_filter_enabled);
|
||||
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_set_filters", "filters"), &AnimationNode::_set_filters);
|
||||
ClassDB::bind_method(D_METHOD("_get_filters"), &AnimationNode::_get_filters);
|
||||
|
||||
|
@ -1362,7 +1354,6 @@ bool AnimationTree::_get(const StringName &p_name, Variant &r_ret) const {
|
|||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
void AnimationTree::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
if (properties_dirty) {
|
||||
|
@ -1412,7 +1403,6 @@ void AnimationTree::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(D_METHOD("rename_parameter", "old_name", "new_name"), &AnimationTree::rename_parameter);
|
||||
|
||||
|
||||
ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationTree::advance);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_node_removed"), &AnimationTree::_node_removed);
|
||||
|
@ -1440,5 +1430,4 @@ AnimationTree::AnimationTree() {
|
|||
}
|
||||
|
||||
AnimationTree::~AnimationTree() {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue