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

Simplify right-click track insertion code #80860

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

RandomShaper
Copy link
Member

The code path used for context-menu track insertion hadn't reset logic implemented. This PR refactors it so it uses the already existing code paths and also avoids some repetition even in the code that remains. The only things preventing this PR from being a true refactor are these:

Fixes #55438.

I've smoke-tested this, but this definitely needs more testers.

@akien-mga
Copy link
Member

@RandomShaper Did you mean to close this? Seems like you force pushed a no-op branch to your PR branch, which closed it.

@RandomShaper
Copy link
Member Author

No, I didn't. Thanks for letting me know. According to Git, everything was up-to-date regardless I had a diverging local commit. I've rebased and re-pushed and it looks good now.

@RandomShaper RandomShaper requested review from TokageItLab and a team September 12, 2023 14:37
@RandomShaper RandomShaper modified the milestones: 4.2, 4.3 Sep 25, 2023
@RandomShaper RandomShaper added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Nov 10, 2023
@akien-mga
Copy link
Member

Poke @TokageItLab

@Arnklit
Copy link
Contributor

Arnklit commented Apr 16, 2024

I just tested this. And it creates the Reset animation and adds the track the first time I add a new animation property and add a key to it, but any subsequent tracks with keys I add don't get added to the Reset animation.

godot.windows.editor.x86_64_Fnvfbqp4sZ.mp4

@RandomShaper
Copy link
Member Author

I guess I need to rebase this. Involved code likely changed a lot since the last push.

@RandomShaper
Copy link
Member Author

I've rebased, but I'm not sure if other code involved has changed in a way that further changes are required, so TIWAGOS.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally (rebased on top of master 71699e0), it works as expected. I tested this with various track types (Property, 3D Rotation/Position/Scale, Audio and so on). Automatically added tracks from the inspector still work correctly.

Code looks good to me.

@akien-mga akien-mga merged commit d66281c into godotengine:master Jun 17, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@RandomShaper RandomShaper deleted the harmonize_track_insert branch June 19, 2024 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release enhancement needs testing topic:animation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

AnimationPlayer RESET track is not created (or properties added) if used Right Click Insert Key in timeline.
4 participants