diff options
Diffstat (limited to 'scene/animation')
-rw-r--r-- | scene/animation/animation_blend_tree.cpp | 1 | ||||
-rw-r--r-- | scene/animation/animation_blend_tree.h | 16 | ||||
-rw-r--r-- | scene/animation/animation_node_state_machine.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_player.cpp | 10 | ||||
-rw-r--r-- | scene/animation/animation_player.h | 2 | ||||
-rw-r--r-- | scene/animation/animation_tree.cpp | 6 | ||||
-rw-r--r-- | scene/animation/animation_tree.h | 2 |
7 files changed, 19 insertions, 20 deletions
diff --git a/scene/animation/animation_blend_tree.cpp b/scene/animation/animation_blend_tree.cpp index 3de3ab256e..17a99ed034 100644 --- a/scene/animation/animation_blend_tree.cpp +++ b/scene/animation/animation_blend_tree.cpp @@ -576,7 +576,6 @@ void AnimationNodeBlend3::_bind_methods() { } AnimationNodeBlend3::AnimationNodeBlend3() { - blend_amount = "blend_amount"; add_input("-blend"); add_input("in"); add_input("+blend"); diff --git a/scene/animation/animation_blend_tree.h b/scene/animation/animation_blend_tree.h index 1be0f162df..0a2305b8d6 100644 --- a/scene/animation/animation_blend_tree.h +++ b/scene/animation/animation_blend_tree.h @@ -102,7 +102,7 @@ private: float time; float remaining;*/ - StringName active = "active"; + StringName active = PNAME("active"); StringName prev_active = "prev_active"; StringName time = "time"; StringName remaining = "remaining"; @@ -148,7 +148,7 @@ VARIANT_ENUM_CAST(AnimationNodeOneShot::MixMode) class AnimationNodeAdd2 : public AnimationNode { GDCLASS(AnimationNodeAdd2, AnimationNode); - StringName add_amount = "add_amount"; + StringName add_amount = PNAME("add_amount"); bool sync = false; protected: @@ -172,7 +172,7 @@ public: class AnimationNodeAdd3 : public AnimationNode { GDCLASS(AnimationNodeAdd3, AnimationNode); - StringName add_amount = "add_amount"; + StringName add_amount = PNAME("add_amount"); bool sync = false; protected: @@ -196,7 +196,7 @@ public: class AnimationNodeBlend2 : public AnimationNode { GDCLASS(AnimationNodeBlend2, AnimationNode); - StringName blend_amount = "blend_amount"; + StringName blend_amount = PNAME("blend_amount"); bool sync = false; protected: @@ -219,7 +219,7 @@ public: class AnimationNodeBlend3 : public AnimationNode { GDCLASS(AnimationNodeBlend3, AnimationNode); - StringName blend_amount; + StringName blend_amount = PNAME("blend_amount"); bool sync; protected: @@ -241,7 +241,7 @@ public: class AnimationNodeTimeScale : public AnimationNode { GDCLASS(AnimationNodeTimeScale, AnimationNode); - StringName scale = "scale"; + StringName scale = PNAME("scale"); protected: static void _bind_methods(); @@ -260,7 +260,7 @@ public: class AnimationNodeTimeSeek : public AnimationNode { GDCLASS(AnimationNodeTimeSeek, AnimationNode); - StringName seek_pos = "seek_position"; + StringName seek_pos = PNAME("seek_position"); protected: static void _bind_methods(); @@ -300,7 +300,7 @@ class AnimationNodeTransition : public AnimationNode { StringName prev_xfading = "prev_xfading"; StringName prev = "prev"; StringName time = "time"; - StringName current = "current"; + StringName current = PNAME("current"); StringName prev_current = "prev_current"; float xfade = 0.0; diff --git a/scene/animation/animation_node_state_machine.cpp b/scene/animation/animation_node_state_machine.cpp index 39849a0b00..fcc4548929 100644 --- a/scene/animation/animation_node_state_machine.cpp +++ b/scene/animation/animation_node_state_machine.cpp @@ -551,7 +551,7 @@ double AnimationNodeStateMachinePlayback::process(AnimationNodeStateMachine *p_s } } - // time left must always be 1 because the end node don't lenght to compute + // time left must always be 1 because the end node don't length to compute if (p_state_machine->end_node != current) { rem = 1; } else { diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 87bfb64917..921a06b73c 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -1766,12 +1766,12 @@ void AnimationPlayer::_animation_changed() { } void AnimationPlayer::_stop_playing_caches() { - for (RBSet<TrackNodeCache *>::Element *E = playing_caches.front(); E; E = E->next()) { - if (E->get()->node && E->get()->audio_playing) { - E->get()->node->call(SNAME("stop")); + for (TrackNodeCache *E : playing_caches) { + if (E->node && E->audio_playing) { + E->node->call(SNAME("stop")); } - if (E->get()->node && E->get()->animation_playing) { - AnimationPlayer *player = Object::cast_to<AnimationPlayer>(E->get()->node); + if (E->node && E->animation_playing) { + AnimationPlayer *player = Object::cast_to<AnimationPlayer>(E->node); if (!player) { continue; } diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 3ef87dba28..c679405dfe 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -184,7 +184,7 @@ private: int cache_update_prop_size = 0; TrackNodeCache::BezierAnim *cache_update_bezier[NODE_CACHE_UPDATE_MAX]; int cache_update_bezier_size = 0; - RBSet<TrackNodeCache *> playing_caches; + HashSet<TrackNodeCache *> playing_caches; uint64_t accum_pass = 1; float speed_scale = 1.0; diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 127eeed06f..d34e8db093 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -487,9 +487,9 @@ void AnimationTree::set_active(bool p_active) { } if (!active && is_inside_tree()) { - for (RBSet<TrackCache *>::Element *E = playing_caches.front(); E; E = E->next()) { - if (ObjectDB::get_instance(E->get()->object_id)) { - E->get()->object->call(SNAME("stop")); + for (const TrackCache *E : playing_caches) { + if (ObjectDB::get_instance(E->object_id)) { + E->object->call(SNAME("stop")); } } diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h index 37cd22568a..b646efede4 100644 --- a/scene/animation/animation_tree.h +++ b/scene/animation/animation_tree.h @@ -267,7 +267,7 @@ private: }; HashMap<NodePath, TrackCache *> track_cache; - RBSet<TrackCache *> playing_caches; + HashSet<TrackCache *> playing_caches; Ref<AnimationNode> root; |