• Editor
  • After Effects to Spine

Related Discussions
...

Hey all,

I am currently trying to see if Spine is the right tool for a project I am working on. I have an animation created in After Effects and I am trying to use the script to get it to come over to Spine by am getting the following error message:

An error occurred while importing the skeleton. Please be sure to choose a valid skeleton JSON or binary file.

I am trying to import using the 'Import Data...' option, and the file I am selecting is the JSON file that After Effects is spiting out when using the ae_to_sping.jsx scrip

If anyone could point out what I am doing wrong that would be great

Thanks
JC

Hello John! (nice nickname!) the procedure you describe appears to be correct,
I haven't used the AE exporter yet, but try to check out if the limitations listed here: spine-scripts/aftereffects at master · EsotericSoftware/spine-scripts may apply to your case.
If you are sure you avoided them, then try uplading the json that was generated by the script here so we can check what causes the error.

Hey Erikari,

I have attached a sample of the JSON file that is throwing up the error message.

The animation I am using is much more complex than this, but I am not allowed to share the entire thing.

This one still throws up the same message


So, it could be helpful to look in the log and see what the error was caused by (found another forum post suggesting to do this)

Spine Launcher 3.7.81 Trial
Esoteric Software LLC (C) 2013-2019
Mac OS X x86_64 10.14.2
Up to date: Spine 3.7.87 Trial
Spine 3.7.87 Trial
Intel Inc.
Intel Iris Pro OpenGL Engine
2.1 INTEL-12.4.7
OpenAL 1.1, Default audio device
Started.
iI: Error reading animation: animation
   at kR.a(SourceFile:315)
   at lB.a(SourceFile:129)
   at uK.a(SourceFile:298)
   at uK.a(SourceFile:256)
   at uQ.run(SourceFile:223)
   at sZ.a(SourceFile:1765)
   at uK.c(SourceFile:216)
   at ui.b(SourceFile:350)
   at fu.a(SourceFile:92)
   at gF.a(SourceFile:28)
   at eK.a(SourceFile:188)
   at eK.a(SourceFile:158)
   at com.badlogic.gdx.scenes.scene2d.ui.Button.b(SourceFile:131)
   at fn.a(SourceFile:94)
   at gH.a(SourceFile:88)
   at eQ.a(SourceFile:59)
   at eS.b(SourceFile:351)
   at r.b(SourceFile:124)
   at ay.b(SourceFile:89)
   at q.a(SourceFile:86)
   at ax.a(SourceFile:134)
   at aj.b(SourceFile:224)
   at me.b(SourceFile:106)
   at ao.run(SourceFile:194)
   at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.base/java.security.AccessController.doPrivileged(Native Method)
   at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: iI: Slot not found: hair-2-back Outlines
   at kR.a(SourceFile:479)
   at kR.a(SourceFile:313)
   ... 37 more
iI: Error reading animation: animation
   at kR.a(SourceFile:315)
   at lB.a(SourceFile:129)
   at uK.a(SourceFile:298)
   at uK.a(SourceFile:256)
   at uQ.run(SourceFile:223)
   at sZ.a(SourceFile:1765)
   at uK.c(SourceFile:216)
   at ui.b(SourceFile:350)
   at fx.run(SourceFile:263)
   at aj.a(SourceFile:262)
   at aj.b(SourceFile:220)
   at me.b(SourceFile:106)
   at ao.run(SourceFile:194)
   at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.base/java.security.AccessController.doPrivileged(Native Method)
   at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: iI: Slot not found: hair-2-back Outlines
   at kR.a(SourceFile:479)
   at kR.a(SourceFile:313)
   ... 26 more
iI: Error reading animation: animation
   at kR.a(SourceFile:315)
   at lB.a(SourceFile:129)
   at uK.a(SourceFile:298)
   at uK.a(SourceFile:256)
   at uQ.run(SourceFile:223)
   at sZ.a(SourceFile:1765)
   at uK.c(SourceFile:216)
   at ui.b(SourceFile:350)
   at fu.a(SourceFile:92)
   at gF.a(SourceFile:28)
   at eK.a(SourceFile:188)
   at eK.a(SourceFile:158)
   at com.badlogic.gdx.scenes.scene2d.ui.Button.b(SourceFile:131)
   at fn.a(SourceFile:94)
   at gH.a(SourceFile:88)
   at eQ.a(SourceFile:59)
   at eS.b(SourceFile:351)
   at r.b(SourceFile:124)
   at ay.b(SourceFile:89)
   at q.a(SourceFile:86)
   at ax.a(SourceFile:134)
   at aj.b(SourceFile:224)
   at me.b(SourceFile:106)
   at ao.run(SourceFile:194)
   at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
   at java.base/java.security.AccessController.doPrivileged(Native Method)
   at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
   at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: iI: Slot not found: hair-2-back Outlines
   at kR.a(SourceFile:479)
   at kR.a(SourceFile:313)
   ... 37 more

Can anyone tell me what this means?

Thanks for posting the json file, unfortunately it is too reduced to help - it contains no slots at all, but references one in the animation section. This will lead to Caused by: iI: Slot not found: hair-2-back Outlines for sure. Did you remove the entries from the slots section, or was it empty before? This one I mean:

"slots": [
      
],

If you are not allowed to share your work, could you maybe create and export a simple file that shows the same error, without removing anything from the json sections?

Hey Harald,

I didn't remove anything from the slots section, I think that this could be what is causing the issue?

After a bit more exploring it looks like I need to define all the parts in After Effects so that Spine knows what image is in each slot?

Anyone know how I do that, or am I way off with my theory?

Oh, if you have not removed anything from the slots section, then something along the export or some preparation steps must have gone wrong.

After a bit more exploring it looks like I need to define all the parts in After Effects so that Spine knows what image is in each slot?

This sounds like a reasonable step.

Nevertheless it would be great to have a minimal example at hand - if you could create a zipped package of a minimal After Effects file that shows this problem and send it to contact@esotericsoftware.com, that would be very helpful!

6일 후

Hey Harald,

I have checked and I am able to share the work now.

Please find attached the JSON file

Let me know if you need anything to try and solve this

Thanks for the json file!

It looks as if only the root bone plus the HEAD CTRL bone were the only ones exported under the 'setup' part, but nothing else below it in the hierarchy:

"bones": [
      {
         "name": "root"
      },
      {
         "name": "HEAD CTRL",
         "parent": "head Outlines",          <

---

 Note: this 'head Outlines' bone is missing as well!
         "x": 31.478727791011,
         "y": 104.539351217995,
         "scaleX": 0.26,
         "scaleY": 0.24,
         "rotation": 3
      }
   ],
   "slots": [
      {
         "name": "HEAD CTRL",
         "bone": "HEAD CTRL",
         "attachment": "PotatoExample-assets/Null_1",
         "color": "FFFFFF00"
      }
   ],

Whereas animations reference all different kinds of bones, that have never been declared above:

"animations": {
      "animation": {
         "bones": {
            "HEAD CTRL": {    <

---

 Note: this reference is ok, was declared above
                 [...]
            }
         },
         "slots": {
            "hair-2-back Outlines": {   <

---

 Note: this is a reference to a slot that is missing above!
               [...]
            },
            "arm-right": {   <

---

 Note: this is a reference to a slot that is missing above!
               [...]
            },
            "arm-right-sleeve": {   <

---

 Note: this is a reference to a slot that is missing above!
               [...]
            },
            [etc.]

Since I noticed some names like LegLeft::Hip - you could try to rename all names to not contain any special characters? I guess a -shall be no problem, but for testing reasons I would change it to be as simple as possible first.

So I took a look into the file names and I am still running into issues...

I have two JSON files, one that has it's layer names changed but was still using a plugin called Rubber Hose which requires some odd layer names to work properly.

The second one (attached) has the same layer name changes but I have removed all the layers which used the Rubber Hose plugin, yet I am still getting the same error message.

Any ideas?

Unfortunately this json file with your renamed bones shows the same kind of problem - even fewer bones (only the root bone) and no slots are defined here:

"bones": [
   {
      "name": "root"
   }
],
"slots": [
   
],

Is there a way to disable/remove the mentioned Rubber Hose plugin for this project entirely for testing purposes?
As an alternative, could you create another minimal project without the plugin and see if this results in properly exported files?