godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.1k stars 69 forks source link

Use NLA track length when importing animation #2644

Open PaperMartin opened 3 years ago

PaperMartin commented 3 years ago

Describe the project you are working on

A third person fighting game with an animation driven controller

Describe the problem or limitation you are having in your project

My animations are supposed to be a certain length, but have keyframes past that in blender in order to make them loop. The problem is that even when setting the length of an animation on its NLA track, the imported animations's length is still based on the last keyframes, which leads to them looping incorrectly

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

Using the length of each NLA track to set the length property of animations every time an animation is imported

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

The NLA strip frame start/end setting in blender A properly cropped animation in godot

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

It can be worked around by manually setting the length of each animation every time they're reimported, which gets pretty tedious

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

As far as I know there's no way to do this through an addon.

Calinou commented 3 years ago

cc @RevoluPowered