godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.05k stars 65 forks source link

Allow inserting keyframes of any property for multiple nodes #9687

Open ManasMakde opened 1 week ago

ManasMakde commented 1 week ago

Describe the project you are working on

I'm working on a 2D platformer game which uses multiple cutout sprites for a single character

image

Describe the problem or limitation you are having in your project

Due to the character being composed of multiple cutout sprites it's difficult to animate them in the animation player since I have to insert keyframe of every property one by one

For example if I wanted to add a keyframe of offset for all the sprite nodes I'd have to do so manually for every single one

image

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I have 2 solutions in mind:

  1. Show keyframe buttons even when multiple nodes are selected
  2. Add "Insert Property Key" to the "Animation Key and Pose Options"

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

1. Show keyframe buttons even when multiple nodes are selected

Currently when you select a single node in the scene tree it shows the keyframe buttons as such: image

But when you select multiple nodes in the scene tree the keyframe buttons disappear: image

It would feel intuitive to have those keyframe buttons even when multiple nodes are selected and pressing any keyframe of a property would add them to the animation player for all the selected nodes in the scene tree as such (photoshopped image): image

2. Add "Insert Property Key" to the "Animation Key and Pose Options"

If the previous solution isn't possible an alternative solution would be to add a "Insert Property Key" option as such: image

When clicked on it a popup appears asking the user to type the property name (e.g. "offset") and after clicking confirm the keyframes for the property of all the selected nodes are added to the animation player

If this enhancement will not be used often, can it be worked around with a few lines of script?

Maybe via an editor plugin but it wouldn't make much sense

Is there a reason why this should be core and not an add-on in the asset library?

It's an intuitive core feature and feels like it should have been built in by default