- Edited
Flip keys bug in spine-c runtime
I found it is possible to export flip info in bone setup mode.
...
"bones":[
{
"name":"root",
"scaleX":0.562,
"scaleY":0.562,
"flipX":true, // like this example line
"color":"5bff00ff"
},
...
But in SkeletonJson.c,function "spSkeletonJson_readSkeletonData",line 468,the bone data initialization logic,I think the flip setting is missed.(At least in official runtime repo revision 20141018,SHA1:df792f3d)
I added following lines,and my problem solved:
boneData->flipX = Json_getInt(boneMap, "flipX", 0);
boneData->flipY = Json_getInt(boneMap, "flipY", 0);
BTW:I think there is another missing line in Json.c,function "parse_value",line 272.
The "item->type = Json_False;" is ok.But seems missing "item->valueInt = 0;" there compare to the logic of case 't'.
Although the initialization of item->valueInt is 0.The missing line caused the purpose being a bit unclear....