• Bugs
  • [3.6.41] Import Data doesn't work with LayersToPNG .json

Related Discussions
...

I'm getting this error when trying to us Import Data command on .JSON file coming from Photoshop.

This only happens when trying to export groups as skins.

Downgrading to 3.6.40 reads the .JSON file just fine.

As well, I tried with the more current PhotoshopToSpine script. Same error.

7 gün sonra

Hey!
I have the same problem unfortunately.

Here is one of the JASON-Files:


{"skeleton":{"images":"images/"},
"bones":[{"name":"root"}],
"slots":[
   {"name":"Scroll02","bone":"root","attachment":"Scroll02"},
   {"name":"Scroll01","bone":"root","attachment":"Scroll01"},
   {"name":"SkirtBack","bone":"root","attachment":"SkirtBack"},
   {"name":"LowerBody","bone":"root","attachment":"LowerBody"},
   {"name":"ArmRight","bone":"root","attachment":"ArmRight"},
   {"name":"HandRight","bone":"root","attachment":"HandRight"},
   {"name":"Torso","bone":"root","attachment":"Torso"},
   {"name":"ArmLeft","bone":"root","attachment":"ArmLeft"},
   {"name":"necklace","bone":"root","attachment":"necklace"},
   {"name":"skirt","bone":"root","attachment":"skirt"},
   {"name":"WoolBelt","bone":"root","attachment":"WoolBelt"},
   {"name":"ShoulderRight","bone":"root","attachment":"ShoulderRight"},
   {"name":"ShoulderLeft","bone":"root","attachment":"ShoulderLeft"},
   {"name":"HandLeft","bone":"root","attachment":"HandLeft"},
   {"name":"Head","bone":"root","attachment":"Head"},
   {"name":"Nose","bone":"root","attachment":"Nose"},
   {"name":"Hair","bone":"root","attachment":"Hair"},
   {"name":"staff","bone":"root","attachment":"staff"},
   {"name":"ThumbFront","bone":"root","attachment":"ThumbFront"}
],
"skins":{
   "default":{
   },
   "Huntress":{
      "ThumbFront":{"ThumbFront":{"name":"Huntress/ThumbFront", "x":609,"y":430.5,"width":96,"height":99}},
      "staff":{"staff":{"name":"Huntress/staff", "x":669,"y":579,"width":220,"height":746}},
      "Hair":{"Hair":{"name":"Huntress/Hair", "x":314.5,"y":785,"width":559,"height":564}},
      "Nose":{"Nose":{"name":"Huntress/Nose", "x":415,"y":685,"width":72,"height":98}},
      "Head":{"Head":{"name":"Huntress/Head", "x":347.5,"y":750,"width":313,"height":396}},
      "HandLeft":{"HandLeft":{"name":"Huntress/HandLeft", "x":587.5,"y":407,"width":231,"height":182}},
      "ShoulderLeft":{"ShoulderLeft":{"name":"Huntress/ShoulderLeft", "x":433,"y":562.5,"width":172,"height":183}},
      "ShoulderRight":{"ShoulderRight":{"name":"Huntress/ShoulderRight", "x":284,"y":597,"width":132,"height":182}},
      "WoolBelt":{"WoolBelt":{"name":"Huntress/WoolBelt", "x":334,"y":350,"width":250,"height":134}},
      "skirt":{"skirt":{"name":"Huntress/skirt", "x":327,"y":303.5,"width":220,"height":149}},
      "necklace":{"necklace":{"name":"Huntress/necklace", "x":319,"y":503,"width":80,"height":132}},
      "ArmLeft":{"ArmLeft":{"name":"Huntress/ArmLeft", "x":484,"y":504.5,"width":124,"height":165}},
      "Torso":{"Torso":{"name":"Huntress/Torso", "x":364,"y":523,"width":320,"height":238}},
      "HandRight":{"HandRight":{"name":"Huntress/HandRight", "x":116.5,"y":415,"width":233,"height":194}},
      "ArmRight":{"ArmRight":{"name":"Huntress/ArmRight", "x":224.5,"y":520.5,"width":109,"height":175}},
      "LowerBody":{"LowerBody":{"name":"Huntress/LowerBody", "x":280.5,"y":268.5,"width":421,"height":537}},
      "SkirtBack":{"SkirtBack":{"name":"Huntress/SkirtBack", "x":412,"y":321.5,"width":148,"height":149}},
      "Scroll01":{"Scroll01":{"name":"Huntress/Scroll01", "x":185,"y":240.5,"width":208,"height":179}},
      "Scroll02":{"Scroll02":{"name":"Huntress/Scroll02", "x":181.5,"y":323,"width":215,"height":100}}
   }
},
"animations":{"animation":{}}
}

Thanks for the Help!
🙂

I can confirm it's not importing correctly.
The thing that stands out to me in that json is the empty default skin. Not sure if Spine's Import Data feature is handling that correctly or if there's some other weird thing in the json.

This part of the log might be telling though.

Sorry, an unexpected error has occurred:
java.lang.NullPointerException
   at com.esotericsoftware.spine.editor.Editor.a(SourceFile:896)
   at Cn.d(SourceFile:371)
   at uj.a(SourceFile:1175)
   at IH.a(SourceFile:197)
   at gK.a(SourceFile:28)
   at eT.a(SourceFile:182)
   at eT.a(SourceFile:147)
   at com.badlogic.gdx.scenes.scene2d.ui.Button.b(SourceFile:124)
   at fv.a(SourceFile:92)
   at gM.a(SourceFile:89)
   at eZ.a(SourceFile:59)
   at fb.b(SourceFile:351)
   at p.b(SourceFile:96)
   at aC.a(SourceFile:332)
   at ao.run(SourceFile:238)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
   at java.awt.EventQueue.access$300(EventQueue.java:103)
   at java.awt.EventQueue$3.run(EventQueue.java:706)
   at java.awt.EventQueue$3.run(EventQueue.java:704)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

This now imports without error in 3.6.43. Enabling the Huntress skin works as intended as well.