A simple Dragonbones / spine export won't display in Defold

#1

Hi,
I am evaluating Dragonbones and I did a very minimalist test : just one 1 bone, 1 slot, 1 image, no animation. Export to spine json format and import into Defold : it won’t work until I manually modify the json file. ​

Indeed, in Defold the image does not display because, in the json, there is no property “width” and “height” in the skins/default/slot/attachment section.
When I add width and height manually , it works.
(After the property “name”: “Head01”, I added “width”:50, “height”:50 to make it work).

Here is the raw json exported by Dragonbones. You can reproduce the problem : just add an image called “Head01” in an atlas and create the following json : it will not work until you add width and height in the json : https://jsonblob.com/d3071dd8-7440-11eb-a6ca-bdcc9e90d3c5

Edit: now, in Dragonbones, if I check the property “Mesh” for the image, it works in Defold. The json is now :
“name”: “Head01”,
“hull”: 4,
“triangles”: [0, 1, 2, 1, 3, 2],
“uvs”: [0, 0, 1, 0, 0, 1, 1, 1],
“edges”: [0, 2, 2, 6, 4, 6, 4, 0],
“vertices”: [-29.5, 20.5, 29.5, 20.5, -29.5, -20.5, 29.5, -20.5],
“type”: “mesh”

1 Like

#2

Try the export of this version of Dragon Bones

2 Likes