Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add animation inheritance #9802

Open
theraot opened this issue May 22, 2024 · 3 comments
Open

Add animation inheritance #9802

theraot opened this issue May 22, 2024 · 3 comments

Comments

@theraot
Copy link

theraot commented May 22, 2024

Describe the project you are working on

A 3D third person game with souls inspired melee combat.

Describe the problem or limitation you are having in your project

  • I want to add tracks to the imported animations in way that their link to the imported asset is not broken, so I can import a new version of the animation when the animator makes a correction. However, I do not want to lose my work when I modify these animations and I need to import a new version when that happens.

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

I want to make an animation that extends another animation. That is, I want to make an animation defined to include all the tracks of another animation but can also have additional tracks.

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

The Animation class would need a way to refernece a parent Animation and the animation player will include its tracks during playback. The tracks of the included animation should also be included in the animation panel, but be readonly.

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

We can have an animation player reference another animation player.

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

Since we have a workaround this feature is not needed in core per-se. In fact, I have completed games in Godot where I have used said work around multiple times with no big issue.

Yet, it is a recurrent need, and it would be good to have support in core for ease of use.

Futhermore, it would make easier the setup for #9712 - See also: #9801

@Summersay415
Copy link

Summersay415 commented May 22, 2024

godotengine/godot#86779 is not what are you looking for?

@theraot
Copy link
Author

theraot commented May 22, 2024

Perhaps godotengine/godot#86779 will cover this, as it says it should. I would have to test it, and it if works then it closes this proposal too... Meanwhile, I think animations are an special case, which needs custom tooling due to the animation panel, and I think a proposal for animation inheritance in particular makes sense according to https://docs.godotengine.org/en/stable/contributing/development/best_practices_for_engine_contributors.html#to-each-problem-its-own-solution

@theraot
Copy link
Author

theraot commented Jun 4, 2024

I have now taken the time to test godotengine/godot#86779

First of all, there is no longer a way to add just an animation to the Animation player... Thus, although the linked PR allows me to make an Animation that inherits from another, I can't use it.

Thus, I have to make an AnimationLibrary that inherits from another. The problem is that when I modify the animations in the inherited AnimationLibrary, I'm modifying the original.

I can add new Animations to the derived AnimationLibrary which do not appear in the original, but that is not useful for me.

Thus, godotengine/godot#86779 is not sufficient. I do not think it is necessary either, but if that PR will be merged into Godot, it might make sense to implement my proposal ontop of it.

Addendum: I want to clarify that I believe the linked PR is not necesary for this proposal, because I believe this proposal can be implemented independently. However, it makes no sense to do that if that PR is merged, and that PR addresses other issues which are important on their own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants