diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java index 3071babdb..a5c343166 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java +++ b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java @@ -113,6 +113,12 @@ public class SkeletonBinary { skeletonData.height = input.readFloat(); boolean nonessential = input.readBoolean(); + + if (nonessential) { + String imagesPath = input.readString(); + if (imagesPath.length() > 0) skeletonData.imagesPath = imagesPath; + } + // Bones. for (int i = 0, n = input.readInt(true); i < n; i++) { String name = input.readString(); diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java index 12026e133..a845e8ab6 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java +++ b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonData.java @@ -42,7 +42,7 @@ public class SkeletonData { final Array animations = new Array(); final Array ikConstraints = new Array(); float width, height; - String version, hash; + String version, hash, imagesPath; // --- Bones. @@ -197,23 +197,36 @@ public class SkeletonData { this.height = height; } - /** Returns the Spine version used to export this data. */ + /** Returns the Spine version used to export this data, or null. */ public String getVersion () { return version; } + /** @param version May be null. */ public void setVersion (String version) { this.version = version; } + /** @return May be null. */ public String getHash () { return hash; } + /** @param hash May be null. */ public void setHash (String hash) { this.hash = hash; } + /** @return May be null. */ + public String getImagesPath () { + return imagesPath; + } + + /** @param imagesPath May be null. */ + public void setImagesPath (String imagesPath) { + this.imagesPath = imagesPath; + } + public String toString () { return name != null ? name : super.toString(); } diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java index 7c8f1235a..e18a7be94 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java +++ b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java @@ -99,6 +99,7 @@ public class SkeletonJson { skeletonData.version = skeletonMap.getString("spine"); skeletonData.width = skeletonMap.getFloat("width"); skeletonData.height = skeletonMap.getFloat("height"); + skeletonData.imagesPath = skeletonMap.getString("images", null); } // Bones.