summaryrefslogtreecommitdiff
path: root/scene/animation/animation_blend_space_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_blend_space_2d.h')
-rw-r--r--scene/animation/animation_blend_space_2d.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/scene/animation/animation_blend_space_2d.h b/scene/animation/animation_blend_space_2d.h
index 2c684687de..60671f1816 100644
--- a/scene/animation/animation_blend_space_2d.h
+++ b/scene/animation/animation_blend_space_2d.h
@@ -35,7 +35,14 @@
class AnimationNodeBlendSpace2D : public AnimationRootNode {
GDCLASS(AnimationNodeBlendSpace2D, AnimationRootNode)
+public:
+ enum BlendMode {
+ BLEND_MODE_INTERPOLATED,
+ BLEND_MODE_DISCRETE,
+ BLEND_MODE_DISCRETE_CARRY,
+ };
+protected:
enum {
MAX_BLEND_POINTS = 64
};
@@ -56,11 +63,14 @@ class AnimationNodeBlendSpace2D : public AnimationRootNode {
Vector<BlendTriangle> triangles;
StringName blend_position;
+ StringName closest;
+ StringName length_internal;
Vector2 max_space;
Vector2 min_space;
Vector2 snap;
String x_label;
String y_label;
+ BlendMode blend_mode;
void _add_blend_point(int p_index, const Ref<AnimationRootNode> &p_node);
void _set_triangles(const Vector<int> &p_triangles);
@@ -122,10 +132,15 @@ public:
void set_auto_triangles(bool p_enable);
bool get_auto_triangles() const;
+ void set_blend_mode(BlendMode p_blend_mode);
+ BlendMode get_blend_mode() const;
+
virtual Ref<AnimationNode> get_child_by_name(const StringName &p_name);
AnimationNodeBlendSpace2D();
~AnimationNodeBlendSpace2D();
};
+VARIANT_ENUM_CAST(AnimationNodeBlendSpace2D::BlendMode)
+
#endif // ANIMATION_BLEND_SPACE_2D_H