summaryrefslogtreecommitdiff
path: root/scene/animation/animation_graph_player.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-06-21 15:45:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-06-21 15:46:11 -0300
commita0719533bdc4e99a24bd02886fc77a29d5d30dfc (patch)
tree933787c538ee103a70f1fcb34ef5001fd903d8c2 /scene/animation/animation_graph_player.h
parent0254616c37767aadec4bcbd1863313961ed820fb (diff)
Animation Blend Spaces
Diffstat (limited to 'scene/animation/animation_graph_player.h')
-rw-r--r--scene/animation/animation_graph_player.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/scene/animation/animation_graph_player.h b/scene/animation/animation_graph_player.h
index 6487a48f34..8952be75c9 100644
--- a/scene/animation/animation_graph_player.h
+++ b/scene/animation/animation_graph_player.h
@@ -61,8 +61,7 @@ public:
void _pre_update_animations(HashMap<NodePath, int> *track_map);
Vector2 position;
- friend class AnimationNodeBlendTree;
- AnimationNodeBlendTree *tree;
+ AnimationNode *parent;
AnimationGraphPlayer *player;
float _blend_node(Ref<AnimationNode> p_node, float p_time, bool p_seek, float p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_optimize = true, float *r_max = NULL);
@@ -84,12 +83,14 @@ protected:
void _validate_property(PropertyInfo &property) const;
public:
- Ref<AnimationNodeBlendTree> get_tree() const;
+ void set_parent(AnimationNode *p_parent);
+ Ref<AnimationNode> get_parent() const;
virtual void set_graph_player(AnimationGraphPlayer *p_player);
AnimationGraphPlayer *get_graph_player() const;
AnimationPlayer *get_player() const;
virtual float process(float p_time, bool p_seek);
+ virtual String get_caption() const;
int get_input_count() const;
String get_input_name(int p_input);
@@ -101,8 +102,6 @@ public:
void set_input_name(int p_input, const String &p_name);
void remove_input(int p_index);
- virtual String get_caption() const;
-
void set_filter_path(const NodePath &p_path, bool p_enable);
bool is_path_filtered(const NodePath &p_path) const;
@@ -119,6 +118,13 @@ public:
VARIANT_ENUM_CAST(AnimationNode::FilterAction)
+//root node does not allow inputs
+class AnimationRootNode : public AnimationNode {
+ GDCLASS(AnimationRootNode, AnimationNode)
+public:
+ AnimationRootNode() {}
+};
+
class AnimationGraphPlayer : public Node {
GDCLASS(AnimationGraphPlayer, Node)
public: