diff options
Diffstat (limited to 'scene/animation')
| -rw-r--r-- | scene/animation/animation_player.cpp | 11 | ||||
| -rw-r--r-- | scene/animation/animation_player.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index ea445b157..206f3ccca 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -33,6 +33,17 @@ #include "message_queue.h" #include "scene/scene_string_names.h" +#ifdef TOOLS_ENABLED +void AnimatedValuesBackup::update_skeletons() { + + for (int i = 0; i < entries.size(); i++) { + if (entries[i].bone_idx != -1) { + Object::cast_to<Skeleton>(entries[i].object)->notification(Skeleton::NOTIFICATION_UPDATE_SKELETON); + } + } +} +#endif + bool AnimationPlayer::_set(const StringName &p_name, const Variant &p_value) { String name = p_name; diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h index 4a347f49e..e39afcf19 100644 --- a/scene/animation/animation_player.h +++ b/scene/animation/animation_player.h @@ -50,6 +50,9 @@ class AnimatedValuesBackup { Vector<Entry> entries; friend class AnimationPlayer; + +public: + void update_skeletons(); }; #endif |
