Open samlletas opened 4 years ago
I'd love this, but I'm not sure if this needs a separate "Offset" button though. We already have "Loop". Why not use that?
You can already select multiple keys and drag them around. The only thing lacking would be to have keys that appear in the beginning when they are dragged beyond the animation length. Using the loop button to enable that behavior would make a lot of sense to me. The word "Offset" on the other hand would confuse me more, as I would expect it to have some sort of connection to the Offset property of Node2D heirs.
Thinking more about it, it would be different from just selecting a bunch of keys and dragging them arround, as all keys within the animation length, even those that are not selected, would have to be dragged around as well. So maybe it does need a separate button.
@golddotasksquestions The current "Loop" button controls whether the entire animation should loop, I think a different toggle button would work better for this case since we should be able to "offset" the keys regardless if the animation is being looped or not.
As you mention this is different from just dragging keys so I think it makes sense for it to have its own button.
I agree that "offset" may sound a bit confusing, maybe we could have a different label for it, some ideas come to my mind:
Could it be a key you hold down while dragging the keyframes? Something like the way you hold Ctrl to keep proportions when resizing a rectangle in some software, or holding Shift to move only on X or only on Y.
For the record, Ctrl is already used to toggle snapping, and Shift to toggle precise snapping (when snapping is already enabled).
@bojidar-bg The problem with functionality hidden in shortcuts is if they are only available as shortcuts, that they are mystery functions. Their discoverability is almost not existing. Shortcuts are incredibly powerful and necessary, but only as supplement to good GUI, not as replacement. Good UX has many paths so it allows the user to gradually become a power user. Not expects them to be a power user on day one. Also the user might unlearn things, become less of a power user of a specific feature over time. Good UI caters to that as it provides multiple paths to the same goal that pick up the user where they currently are.
Describe the project you are working on: 2D contra/megaman style action platformer.
Describe the problem or limitation you are having in your project: The godot engine animator is quite powerful already, but I think that fine tuning keyframes can be very time consuming, for example, lets say I create the following grass animation:
As you can see every sprite is moving at the same timing which leads to a kinda robotic-looking animation.
In other animation software such as Spine there is an option to offset keyframes, this basically allows you to drag all the keyframes and loop them over the animation's duration, for example in Spine we can do the following:
As you can see, in the above example when you drag any keyframe then all keyframes positions are adjusted (including curves), this allows to offset movement of individual sprites in an animation which can help to achieve better looking animations.
If we apply offset to each of the sprites in the grass example then we get something like this:
Offseting keyframes gives the illusion that each part of the animation is now moving at a different timing which makes it look more natural.
Describe how this feature / enhancement will help you overcome this problem or limitation: While the animation in example 2 can be perfectly created in Godot, it is extremely time consuming since we need to manually move all of the keyframes and adjust the curves. I think this enhancement will greatly help us to adjust animations much more quickly.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work: I think that having an offset toggle button similar as in spine would be good, once enabled dragging any keyframe should adjust all the keyframes in the track:
Additional to moving/looping keyframes, curves should also automatically be adjusted in order for the track to maintain the original keyframes transitions.
Describe implementation detail for your proposal (in code), if possible:
If this enhancement will not be used often, can it be worked around with a few lines of script?: Animations can be adjusted but as mentioned above it is very time consuming, specially with complex animations with a lot of keyframes.
Is there a reason why this should be core and not an add-on in the asset library?: For me, the animator is one of godot's best features as it integrates very well with the engine so I think adding this usability enhancement can help animators achieve the results they want in much less time.