summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_player.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation/animation_player.h')
-rw-r--r--scene/animation/animation_player.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index e05a2c9935..3223e2522d 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -68,6 +68,8 @@ private:
AnimationData *from = nullptr;
double pos = 0.0;
float speed_scale = 1.0;
+ double start_time = 0.0;
+ double end_time = 0.0;
};
struct Blend {
@@ -177,7 +179,11 @@ public:
Tween::EaseType get_auto_capture_ease_type() const;
void play(const StringName &p_name = StringName(), double p_custom_blend = -1, float p_custom_scale = 1.0, bool p_from_end = false);
+ void play_section_with_markers(const StringName &p_name = StringName(), const StringName &p_start_marker = StringName(), const StringName &p_end_marker = StringName(), double p_custom_blend = -1, float p_custom_scale = 1.0, bool p_from_end = false);
+ void play_section(const StringName &p_name = StringName(), double p_start_time = -1, double p_end_time = -1, double p_custom_blend = -1, float p_custom_scale = 1.0, bool p_from_end = false);
void play_backwards(const StringName &p_name = StringName(), double p_custom_blend = -1);
+ void play_section_with_markers_backwards(const StringName &p_name = StringName(), const StringName &p_start_marker = StringName(), const StringName &p_end_marker = StringName(), double p_custom_blend = -1);
+ void play_section_backwards(const StringName &p_name = StringName(), double p_start_time = -1, double p_end_time = -1, double p_custom_blend = -1);
void play_with_capture(const StringName &p_name = StringName(), double p_duration = -1.0, double p_custom_blend = -1, float p_custom_scale = 1.0, bool p_from_end = false, Tween::TransitionType p_trans_type = Tween::TRANS_LINEAR, Tween::EaseType p_ease_type = Tween::EASE_IN);
void queue(const StringName &p_name);
Vector<String> get_queue();
@@ -207,9 +213,13 @@ public:
double get_current_animation_position() const;
double get_current_animation_length() const;
-#ifdef TOOLS_ENABLED
- void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
-#endif
+ void set_section_with_markers(const StringName &p_start_marker = StringName(), const StringName &p_end_marker = StringName());
+ void set_section(double p_start_time = -1, double p_end_time = -1);
+ void reset_section();
+
+ double get_section_start_time() const;
+ double get_section_end_time() const;
+ bool has_section() const;
virtual void advance(double p_time) override;