Hi guys,
I've tried exporting my layers to json using the Photoshop script and it's not importing into Spine correctly because wherever there should be a number the json has NaN instead!
Example output:
{"bones":[{"name":"root"}],"slots":[
{"name":"right-hand","bone":"root","attachment":"right-hand"},
{"name":"right-lower-arm","bone":"root","attachment":"right-lower-arm"},
{"name":"right-upper-arm","bone":"root","attachment":"right-upper-arm"},
{"name":"right-upper-leg","bone":"root","attachment":"right-upper-leg"},
{"name":"right-lower-leg","bone":"root","attachment":"right-lower-leg"},
{"name":"left-upper-leg","bone":"root","attachment":"left-upper-leg"},
{"name":"left-lower-leg","bone":"root","attachment":"left-lower-leg"},
{"name":"torso","bone":"root","attachment":"torso"},
{"name":"head","bone":"root","attachment":"head"},
{"name":"mouth","bone":"root","attachment":"mouth"},
{"name":"moustache","bone":"root","attachment":"moustache"},
{"name":"right-eye","bone":"root","attachment":"right-eye"},
{"name":"nose","bone":"root","attachment":"nose"},
{"name":"left-eye","bone":"root","attachment":"left-eye"},
{"name":"right-eyebrow","bone":"root","attachment":"right-eyebrow"},
{"name":"left-eyebrow","bone":"root","attachment":"left-eyebrow"},
{"name":"hat","bone":"root","attachment":"hat"},
{"name":"left-hand","bone":"root","attachment":"left-hand"},
{"name":"left-lower-arm","bone":"root","attachment":"left-lower-arm"},
{"name":"left-upper-arm","bone":"root","attachment":"left-upper-arm"},
],"skins":{"default":{
"right-hand":{"right-hand":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"right-lower-arm":{"right-lower-arm":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"right-upper-arm":{"right-upper-arm":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"right-upper-leg":{"right-upper-leg":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"right-lower-leg":{"right-lower-leg":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"left-upper-leg":{"left-upper-leg":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"left-lower-leg":{"left-lower-leg":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"torso":{"torso":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"head":{"head":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"mouth":{"mouth":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"moustache":{"moustache":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"right-eye":{"right-eye":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"nose":{"nose":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"left-eye":{"left-eye":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"right-eyebrow":{"right-eyebrow":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"left-eyebrow":{"left-eyebrow":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"hat":{"hat":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"left-hand":{"left-hand":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"left-lower-arm":{"left-lower-arm":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
"left-upper-arm":{"left-upper-arm":{"x":NaN,"y":NaN,"width":NaN,"height":NaN}},
}}, "animations": { "animation": {} }}
Can anyone help with this please?
Thanks!
Ignore that - after looking at the script I figured it out.
My canvas was set to percent rather than pixels in Photoshop!