|
@@ -37,12 +37,20 @@
|
|
|
|
|
|
#ifdef TOOLS_ENABLED
|
|
#ifdef TOOLS_ENABLED
|
|
#include "editor/editor_settings.h"
|
|
#include "editor/editor_settings.h"
|
|
|
|
+#include "scene/2d/skeleton_2d.h"
|
|
|
|
|
|
void AnimatedValuesBackup::update_skeletons() {
|
|
void AnimatedValuesBackup::update_skeletons() {
|
|
|
|
|
|
for (int i = 0; i < entries.size(); i++) {
|
|
for (int i = 0; i < entries.size(); i++) {
|
|
if (entries[i].bone_idx != -1) {
|
|
if (entries[i].bone_idx != -1) {
|
|
|
|
+ // 3D bone
|
|
Object::cast_to<Skeleton>(entries[i].object)->notification(Skeleton::NOTIFICATION_UPDATE_SKELETON);
|
|
Object::cast_to<Skeleton>(entries[i].object)->notification(Skeleton::NOTIFICATION_UPDATE_SKELETON);
|
|
|
|
+ } else {
|
|
|
|
+ Bone2D *bone = Object::cast_to<Bone2D>(entries[i].object);
|
|
|
|
+ if (bone && bone->skeleton) {
|
|
|
|
+ // 2D bone
|
|
|
|
+ bone->skeleton->_update_transform();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|