• EditorBugs
  • Graph editor causing unexpected snapping

Hi! I think I've found some sort of bug with the graph editor -- I couldn't find any other posts about it through a quick Google search so thought I should ask about it.

When I'm editing a key's curves in the graph editor, sometimes it causes keys later on in the animation to begin snapping, as though using stepped curves (this isn't the case -- the keys that snap are still shown to be using smooth bezier transitions). I think this is a bug because when I save, close, and re-open the spine file, the snapping is no longer present. The snapping is present if I export the animation as a gif. It's confusing to word, so I'll use some images/gifs.


Not sure if this is specific to the one file I'm working on right now -- the issue appears a bit randomly so I haven't tested any other files to see if it happens there. I can provide the spine file if necessary via email.

Editor: 4.1.23 PRO, launcher: 4.1.11

Related Discussions
...

I see the behavior in the GIF, thanks. If it goes away after reopening the project then it is definitely a bug. My guess is something about the curves doesn't get recalculated. To be able to fix it we'd need to know how to get the curves in that. Unfortunately that may be difficult to figure out.

Do you have an idea what actions you took that lead to this? It's probably not easy to think back about the actions you took once you notice the problem, and the relevant actions you may have taken a long time ago. It'd be ideal to have exact reproduction steps, for example starting from a blank animation, create the keys a particular way. It could require copy/pasting keys or something else to trigger it though.

We'll keep an eye out for it. If you have an additional insights, those might help.

    Nate I did a little testing to see if I could recreate it in a new project, and I did manage to. Not all of these steps may be necessary, but I think copying/pasting part of an animation that already uses bezier curves is the catalyst.

    1. Make some random keys in a fresh animation. I found the issue happens with both rotation and translation keys, didn't test scaling or shearing.
    2. Set the keys to use bezier curves in the graph editor.
    3. Create a new animation and use some more random keys -- do not edit these in the graph editor yet.
    4. Copy all keys from the first animation, paste them at the end of the second animation.
    5. Now, select the first keys in the second animation and, in the graph editor, swap them from linear curves to bezier curves.
    6. When you play the animation in full, the keys you copied/pasted will snap as though not using bezier curves.

    Hope this enables you to replicate the issue!

      necromancy Thank you for your detailed confirmation on how to reproduce the bug! However, I was unable to reproduce it by following those steps on my end. Could you please send us a Spine project that can confirm the bug for sure?: contact@esotericsoftware.com
      Please briefly mention this forum thread URL in the email so that we know the context.

      I made a fresh spine file and can upload it here for you -- the images shouldn't be important as it's the bones that snap. The thing is, as I mentioned in my first post, the issue disappears on saving & reopening the file, so I doubt you'll be able to see the snapping.
      I created this file on a different PC than the first one, so I can confirm I'm able to replicate the bug on two different computers.
      In this file, snapping occurred on frame 30.

      test.spine
      791B

        necromancy Thank you for providing the repro project! However, somehow I could not see the bug. The result of the playback the animations on my end are shown in the video below:

        I also tried copying and pasting the keys of 1st animation into 2nd animation, but still could not reproduce it. Sorry for bothering you again, but if possible, could you please show us the steps to reproduce the bug as a video?

          Misaki Hi! Sorry it took so long to get back to you, I got really busy with work. Here's a link to a video I made replicating the bug from a new project. Hope this helps!

            • Editado

            necromancy Thank you for showing the procedure in the video! That is very clear and really helpful. I am pretty sure this is a bug, and I will create an issue ticket to fix it soon.

            For your information, as far as I have tried on my end, this can be reproduced even if you only do it on the Dopesheet view, so there seems to be no particular need to switch to the Graph view to reproduce the bug.

            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.

              Misaki Glad it was helpful! Sorry if my instructions to recreate the bug were unclear initially. In the meantime, I'll definitely try to remember to swap the curve type of all keys to bezier before pasting new keys in, or paste all the keys I need right at the start of the animation process so I can overwrite the curves later. If the snapping does occur, though, I find that swapping keys to linear/stepped and then back to bezier resets my curve handles. Is there a way to do this while maintaining the curve handles' lengths/positions? I'm a bit new to Spine.

                necromancy No need to apologize at all! I really appreciate your patience and explanation.

                Is there a way to do this while maintaining the curve handles' lengths/positions?

                For that purpose, the Store button on the Graph view would be useful. It stores all the current keys and handles for the whole animation. The stored curves are drawn in the background and can be used as a reference when you reproduce the curve handles' length and angle before set it to Linear.

                However, as far as I have tried, I was able to solve the snapping problem by changing the angle of the curve handles of the key where the snapping occurs and then using Ctrl+Z (command+Z on macOS) to undo the change. This way returns the curve handles to the exact same length and angle as it was, but the snapping will somehow never happen again.

                  9 meses más tarde

                  necromancy Sorry for the long wait, but the bug you reported has been fixed in 4.2.57-beta. Thank you for reporting the problem!