summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-22 10:13:57 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-22 10:13:57 +0100
commit0a15f5161753e8574befb54fa72aa00214b01d35 (patch)
tree24015c3c396ab429200ac1e8ae2ab483d4f2a542 /scene/resources
parent7fab2d7f46cc219bba04b17138e362eb5e8275e2 (diff)
parentd49ac0466f354369519f2399b9610253504b17b6 (diff)
Merge pull request #73741 from dalexeev/fix-sprite-frames-convert
Fix `SpriteFrames` data loss on 3-to-4 conversion
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/sprite_frames.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/sprite_frames.cpp b/scene/resources/sprite_frames.cpp
index 818be38681..17aaf579dd 100644
--- a/scene/resources/sprite_frames.cpp
+++ b/scene/resources/sprite_frames.cpp
@@ -201,6 +201,7 @@ void SpriteFrames::_set_animations(const Array &p_animations) {
anim.loop = d["loop"];
Array frames = d["frames"];
for (int j = 0; j < frames.size(); j++) {
+#ifndef DISABLE_DEPRECATED
// For compatibility.
Ref<Resource> res = frames[j];
if (res.is_valid()) {
@@ -208,6 +209,7 @@ void SpriteFrames::_set_animations(const Array &p_animations) {
anim.frames.push_back(frame);
continue;
}
+#endif
Dictionary f = frames[j];