EsotericSoftware / spine-editor

Issue tracking for the Spine editor.
http://esotericsoftware.com/
29 stars 2 forks source link

Snapping occurs when keys with Bezier curves are pasted and then the previous keys are turned to Bezier #749

Closed misaki-eymard closed 6 months ago

misaki-eymard commented 1 year ago

Description: If you paste keys with Bezier curve type and then change the curve type of the keys before the pasted keys to Bezier from Linear, the bone's movement appears to snap just before the pasted key. The curve appears to be smoothly connected in the Graph view, so there is a discrepancy with the actual behavior. In the animated GIF below, you can see the snapping occurring around frame 20 (Though the curve you can see in the Graph view is smoothly connected).:

Snapping-issue

Expected behavior: Snapping does not occur and the bone's movement is connected smoothly:

Expected-behavior

Steps to reproduce:

  1. Download the attached .zip file: Snapping-issue.zip
  2. Select the animation named 02_Second-half and copy all keys on the timeline.
  3. Select the animation named 01_First-half and paste the keys after the existing keys. (Do not overwrite the existing key, but paste the key a few frames later than the existing key.)
  4. Select the keys that were originally in 01_First-half and set the curve type to Bezier.
  5. Play the animation and you will find the root bone's movement is snapped when the timeline bar approaches the pasted keys.

If for some reason it does not work, you can play 04_Combined-and-turn-to-bezier<BUG> to see the snapping bug.

Workarounds: As a workaround, you can change the curve type of the key immediately before the key being pasted to Bezier before pasting the key. Also, even if the snapping problem happens, it can be fixed by making the curve type of the key where snapping occurs Linear or Stepped once and then Bezier again.

The version of Spine in which this issue was found: Spine 4.1.23

This issue was reported on the following forum post: https://esotericsoftware.com/forum/d/24418-graph-editor-causing-unexpected-snapping/

NathanSweet commented 6 months ago

4.2.57-beta