Hello, while experimenting with ik constraints I noticed some weird things going on, so I`ll try to describe them here:
Repo steps:
1) Create a Spine project and setup a scene using 1 or 2 bone ik constraints
2) Modify the Ik constraint timeline`s 'Options', leaving the 'Mix' untouched at 100
3) Export to .json and check the exported values
4) Notice there might be a problem
According to Spine: JSON export format: IK constraint timeline the ik constraint options can be animated.
For 1 bone ik:
- Mix
- Compress
- Stretch
- Uniform (not mentioned in docs as animated, but it is not disabled in Animate mode)[/i]
For 2 bone ik:
- Mix
- Smoothness
- Positive (Bend positive)
- Stretch[/i]
I created a test project: ik.spine which has the mentioned animations.
If you drag over the timeline you`ll be able to see how the options change in time.
The resulting file is here: ik.json
"ik": {
"1 bone ik": [
{}
],
"2 bone ik": [
{ "time": 1, "stretch": true, "curve": "stepped" },
{ "time": 2.3333, "curve": "stepped" },
{ "time": 3, "bendPositive": false, "curve": "stepped" },
{ "time": 3.6667, "stretch": true, "curve": "stepped" },
{ "time": 4, "bendPositive": false, "stretch": true }
]
}
Obviously, the "1 bone ik" is missing the animated "Compress" and "Stretch" parameters. I did not animate the "Uniform" parameter because it`s not mentioned in the docs and is treated as constant for the whole animation, although in this case it should be disabled (grayed out) in Animate mode.
If I make changes to the "Mix" parameter, then some values are exported, but I want the "Mix" to stay at 100%.
The "2 bone ik" animation has most of its parameters exported, although the "Softness" is animated, but not exported. It's also missing the key at frame 40 (time 1.33) where the "Stretch" parameter changes from 'true' to 'false'. It's missing key at frame 60 (time 2.0), where the "Smoothness" parameter should change. The "Positive" and "Stretch" are at default values, but "Smoothness" is not, so key should not be skipped here. Similarly, it`s missing the keys at frame 70, 90 and 100, which do hold changes.
Overall, I'm a bit confused with this output, also which parameters I can and cannot change.
When I import the .json back to Spine I see different visual output, so I guess this in not the expected behavior.
Thanks for your time.