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

core: move parts of the animation system to hyprutils #8868

Merged
merged 6 commits into from
Jan 7, 2025

Conversation

PaideiaDilemma
Copy link
Contributor

@PaideiaDilemma PaideiaDilemma commented Dec 27, 2024

Requires hyprwm/hyprutils#27

Describe your PR, what does it fix/add?

Moves core components of the animation system to hyprutils. (In order to use it in hyprlock as well)
Introduces smart pointers for animated variables and animation properties.

Interface changes:

  • AnimatedVaraibles are now created/initialized with g_pAnimationManager->createAnimation. That function takes a value to always have AnimatedVaraibles explicitly initialized to a value.
  • All AnimatedVariables are now SPs, resulting in a required operator* for assignments (e.g *m_vRealSize = Vector2D(42,42) and in a change from av.setValue to av->setValue
  • Animation config is now updated with av->setConfig.
  • CAnimatedVaraible now has member functions enabled, getBezierName and getStyle to get their config properties more easily.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Needs testing.
The damage handling was refactored a bit. Previously it damaged before and after a variable update in CAnimationManager::tick. I don't think that is needed and from what i tested it works the same as before.
Possibly needs to be reverted to how it worked before, but the damage handling needs to be moved into functions, because we need to upcast first to get the context of animated variables.

Is it ready for merging, or does it need work?

Need some testing and review.

@vaxerski
Copy link
Member

vaxerski commented Jan 1, 2025

I've pushed hyprutils 0.3.1, cmakelists can be updated

@vaxerski
Copy link
Member

vaxerski commented Jan 2, 2025

with HU 0.3.2 https://github.com/hyprwm/hyprutils/releases/tag/v0.3.2 I assume this should also move to the config tree before mergin?

@PaideiaDilemma
Copy link
Contributor Author

Yes sir, i think that would be best

@PaideiaDilemma PaideiaDilemma force-pushed the hyprutils-animation branch 2 times, most recently from 137b7aa to 18bbbe9 Compare January 2, 2025 15:14
@PaideiaDilemma
Copy link
Contributor Author

I am going to rebase and cleanup the commit history of this PR so that all updates regarding the usage of animated variables (so adding * and changing . to ->) are in a separate commit.

Hopefully that will make it a bit easier to review.

@vaxerski
Copy link
Member

vaxerski commented Jan 4, 2025

thanks :) tag me when ready

@PaideiaDilemma
Copy link
Contributor Author

@vaxerski ready.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

thanks!

@vaxerski vaxerski merged commit 5642ed3 into hyprwm:main Jan 7, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants