• EditorBugs
  • Export / Import, Skin, Weight, Bones.

Problem statement

When you import a bones in an existing skeleton, the skinned bones origin are set to 0,0.
I'll provide picture, I hope they will help you understand better the problem.

So, here is my step about the bug :
1) Create at least one bones
2) Put it in a skin
3) Export it
4) Create a new project (You can stay in the same project though, it's just to make everything clear)
5) Import the previously exported project in the existing skeleton. You can check either "Replace" or "Ignore" in the option, it won't change anything.
6) The project is imported, but skinned bones position are reset to 0,0

Here is four ... it was an ears before but anyways, here are four ...thing.
The grey one is completly free of skin. The mesh is weighted to the bones.
The red one is completly skinned in "skin 1" (Yes I am a creative as you can see), and the mesh is weighted too. (They are all weighted actually)
The green one got two bones skinned at "skin 2", leaving 1 unskined. Weighted as well.
The blue one got one bones skinned at "skin 3", leaving 2 unskined. Weighted as well.
Expected Result

If you import it in a new skeleton / project, everything is fine. But, even if it's a fresh new empty project, if I import it in a existing skeleton, here is the result :
Expected Result
As you can see, the red bones are now all in 0,0 position. Two green (the skinned one) are also at >! 0,0 and the only bones that was skinned for the blue one is at 0,0 too.

I used three different skin but it did the same with only one skin too.

I didn't get any error so I can't give a spine.log...
I can shared the exported JSON though, even if I don't think it will help you that much :

{
"skeleton": {
"hash": "lC9AKtYPrrk",
"spine": "4.2.09-beta",
"x": 379.12,
"y": -819.96,
"width": 916.86,
"height": 468.29,
"images": "",
"audio": ""
},
"bones": [
{ "name": "root" },
{ "name": "bone", "parent": "root", "length": 248.36, "x": 500.74, "y": -449.08 },
{ "name": "bone2", "parent": "bone", "length": 196.74, "rotation": -0.72, "x": 248.36 },
{ "name": "bone3", "parent": "bone2", "length": 157.38, "rotation": 0.72, "x": 196.74 },
{
"name": "bone4",
"parent": "root",
"length": 248.36,
"x": 500.74,
"y": -753.99,
"skin": true,
"color": "ff0000ff"
},
{
"name": "bone5",
"parent": "bone4",
"length": 196.74,
"rotation": -0.72,
"x": 248.36,
"skin": true,
"color": "ff0000ff"
},
{
"name": "bone6",
"parent": "bone5",
"length": 157.38,
"rotation": 0.72,
"x": 196.74,
"skin": true,
"color": "ff0000ff"
},
{ "name": "bone7", "parent": "root", "length": 248.36, "x": 500.74, "y": -1105.63, "color": "06ff00ff" },
{
"name": "bone8",
"parent": "bone7",
"length": 196.74,
"rotation": -0.72,
"x": 248.36,
"skin": true,
"color": "06ff00ff"
},
{
"name": "bone9",
"parent": "bone8",
"length": 157.38,
"rotation": 0.72,
"x": 196.74,
"skin": true,
"color": "06ff00ff"
},
{ "name": "bone10", "parent": "root", "length": 248.36, "x": 500.74, "y": -1422.84, "color": "009fffff" },
{ "name": "bone11", "parent": "bone10", "length": 196.74, "rotation": -0.72, "x": 248.36, "color": "009fffff" },
{
"name": "bone12",
"parent": "bone11",
"length": 157.38,
"rotation": 0.72,
"x": 196.74,
"skin": true,
"color": "009fffff"
}
],
"slots": [
{ "name": "bone", "bone": "bone" },
{ "name": "bone2", "bone": "bone4", "color": "ff0000ff", "attachment": "bone" },
{ "name": "bone3", "bone": "bone7", "color": "1aff00ff", "attachment": "bone" },
{ "name": "bone4", "bone": "bone10", "color": "00a6ffff", "attachment": "bone" }
],
"skins": [
{
"name": "Skin 1",
"color": "ff0000ff",
"bones": [ "bone4", "bone5", "bone6" ]
},
{
"name": "Skin 2",
"color": "17ff00ff",
"bones": [ "bone8", "bone9" ]
},
{
"name": "Skin 3",
"color": "00b0ffff",
"bones": [ "bone12" ]
}
],
"animations": {
"First": {
"bones": {
"bone": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone2": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone3": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone4": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone5": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone6": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone7": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone8": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone9": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone10": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone11": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
},
"bone12": {
"rotate": [
{},
{ "time": 0.6667, "value": -15.98 },
{ "time": 2, "value": 17.68 },
{ "time": 2.6667 }
]
}
}
}
}
}

    Related Discussions
    ...

    Pentacles
    Oh, yeah, I forgot to tell, in the provided JSON I removed the mesh, as they were here only to point that the bones position were effectivly moved at origin.

      Pentacles Hmmm, the following step of the procedure you explained looks strange:

      5) Import the previously exported project in the existing skeleton. You can check either "Replace" or "Ignore" in the option, it won't change anything.

      Importing a JSON or binary file into an existing skeleton is basically for importing a file exported from an image editor using a script such as PhotoshopToSpine. So I think it would be more correct to say that there is a bug that causes skin bones to be misaligned, but rather that there is a bug that allows you to import skeleton data exported from Spine into an existing skeleton. However, I am not 100% sure if it is intended, so I would ask @Nate to confirm.

        Misaki
        I followed what @Erika tell us to import existing skeleton into another skeleton. The "Import Project" importing it into another skeleton only, with no option for merging them...
        importing skeleton into another existing skeleton

        It work perfectly on normal unskinned bones though. I believe it's what caused this, but I'm not really sure.

        This was a new bug, or at least still occurred in 4.2. We've fixed it in 4.2.10-beta though! 🍻

          Nate
          AMAZING 🍻 !
          Really eager to try it then !!
          You are all doing great job 👏👍The improvements are really nice