diff options
| author | Pedro J. Estébanez | 2017-10-30 19:43:19 +0100 |
|---|---|---|
| committer | Pedro J. Estébanez | 2017-11-25 13:25:14 +0100 |
| commit | d0e09d84f085c5bffdd5ad06d335be20c246e954 (patch) | |
| tree | bbdeba3a273d7e20d58f00c6e10c46aeee684fab /scene/animation | |
| parent | 1964d5fdddf9611e0a69f91e31c06771345754e2 (diff) | |
| download | godot-d0e09d84f085c5bffdd5ad06d335be20c246e954.tar.gz godot-d0e09d84f085c5bffdd5ad06d335be20c246e954.tar.zst godot-d0e09d84f085c5bffdd5ad06d335be20c246e954.zip | |
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 |
