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 an AnimationTreeCommentNode #7313

Open
Flynsarmy opened this issue Jul 18, 2023 · 1 comment
Open

Add an AnimationTreeCommentNode #7313

Flynsarmy opened this issue Jul 18, 2023 · 1 comment

Comments

@Flynsarmy
Copy link

Flynsarmy commented Jul 18, 2023

Describe the project you are working on

A third person character with an AnimationTree.

Describe the problem or limitation you are having in your project

AnimationTrees can get quite complex. I've been using various tricks and techniques to work around current bugs and limitations but will inevitably forget what I've done and upon returning later down the track, be confused about why I've done hwat I've done. This is a common pattern in the developer world.

There is currently no way to add comments inside an AnimationTree to refresh my memory or explain to the next poor soul that has to look at this mess.

Here's an example. I have an AnimationNodeStateMachine where I've added dummy animations with no purpose that I've named noop. Why did I do this? The correct answer is that I'm using a combination of an At End switch and a transition expression to work around a nasty bug in the engine, but it's impossible to tell without a comment block.
image

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

I'd love a Comment node akin to how comments work in Unreal Engines Blueprint system.

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

Here's a screenshot of a Blueprint comment. Ideally we'd get something that works the same way.
image

To add an AnimationTreeNodeComment the user would right click - Add Comment. This node would appear behind others and allow a comment to be typed into it or into a field in the Inspector.

When dragging a comment node around, any other nodes inside of it would also be moved along with it.

All node types (including Comments) can be dragged into and out of a comment node freely.

A comment node has no functionality and doesn't interact with Transitions - it's purely for informational and usability purposes.

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

The workaround is to have a documentation file somewhere in your project folder.

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

A feature like this wouldn't be project-specific. I'm also unsure if new node types can be added with addons.

@Calinou
Copy link
Member

Calinou commented Jul 18, 2023

This is likely pending on godotengine/godot#67152 (or its sub-PRs godotengine/godot#79308 and godotengine/godot#79311) to be completed.

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

2 participants