friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
225 stars 11 forks source link

Curves break when scaling keyframes #210

Open eFe-Munoz opened 1 month ago

eFe-Munoz commented 1 month ago

When the "S" key is used to scale the keyframes of the animation curves, the continuity between the first frame and the second frame is broken and the first frame is lost.

I have tested it multiple times, I am several months giving Fricition to my students so we can test it all together.

Friction version: 0.9.6 Windows 10 64 bits.

ejemplo

rodlie commented 1 month ago

Could you provide the exact steps to reproduce?

I was not able to replicate at first, but after messing around I was able to get part of the curve to disappear (as your screenshot), but it appeared again when I adjusted the first keyframe (refresh bug?).

rodlie commented 1 month ago

I'm probably doing something wrong? ....

https://github.com/user-attachments/assets/47b2bf1b-f5b0-4af9-8a84-ef4aead232ce

eFe-Munoz commented 1 month ago

Yes, you must use "S" (scale) in the timeline. It doesn't matter if it is in graph mode or not, it breaks anyway.

https://github.com/user-attachments/assets/2a2bf9c5-21cd-4fc5-8973-bcca341e8913

rodlie commented 1 month ago

Thanks for the information, now I'm able to replicate :+1:

rodlie commented 1 month ago

So, the bug is because the POS calculations are wrong and ends up with NaN values and it breaks the graph.

So, I can only assume this never worked. I didn't even know they (scale etc) worked on the timeline.

Another discussion is why it's there in the first place, the scale, rotate shortcuts are designed for usage in the viewer and IMHO don't make sense in the graph/timeline, the UX is also broken/nonexistent.

So, before I waste time trying to fix this I would like feedback on the need for this feature in the first place.

PsychoTAL commented 1 month ago

Hello guys.

A little remark (Maybe you have noticed): When scaling a node/key, the graph disappear if only the current frame (the red vertical line) is on the selected node/key THAT HAS HANDLES (been smoothed, symmetric,...) If it is somewhere else (without a key/node or unselected ones), the scaled key/node just moves left and/or right. I haven't detected any other issues for now.

So, in the dev snapshot "0.9.6.1 -8df58d7b", in graph mode, we can move key/node with 'G', scale the intervales with 'S', BUT can not rotate with 'R'. In my humble opinion, if fixing the 'transform shortkey' issues (see also #122) requires too much dedication, leaving it as it is wont be a problem (for me at least, AND if it doesn't break anything else). BUT fixing and fleshing it out would be a very good addition in the future.

Hope that helps. Wish you all the best!