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

Expose AnimationNodeOneShot::mix_mode as a property #37945

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

IllusiveS
Copy link
Contributor

fixes #23458

@Calinou Calinou added this to the 4.0 milestone Jan 5, 2021
@akien-mga akien-mga requested a review from a team February 25, 2021 15:54
@@ -339,6 +339,8 @@ void AnimationNodeOneShot::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_use_sync", "enable"), &AnimationNodeOneShot::set_use_sync);
ClassDB::bind_method(D_METHOD("is_using_sync"), &AnimationNodeOneShot::is_using_sync);

ADD_PROPERTY(PropertyInfo(Variant::INT, "mix mode", PROPERTY_HINT_ENUM, "Blend, Add"), "set_mix_mode", "get_mix_mode");
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest using "mix_mode" instead of "mix mode" (which is the pattern for properties everywhere).

To be clear, the change as it is fixes the bug (makes the property available on the Inspector Panel when the node is selected). I'm thinking about not adding extra hassle for scripting.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, the fixed part is right, but the formatting is not right. I did not test it properly, so overlooked it.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the review, I force pushed an update to fix this.

@akien-mga akien-mga added cherrypick:3.4 cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement and removed bug labels Jan 25, 2022
@IllusiveS IllusiveS requested a review from a team as a code owner January 25, 2022 00:17
@akien-mga akien-mga changed the title exposing AnimationNodeOneShot::mix_mode Expose AnimationNodeOneShot::mix_mode as a property Jan 25, 2022
@akien-mga akien-mga merged commit 3102660 into godotengine:master Jan 25, 2022
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jan 25, 2022
@akien-mga
Copy link
Member

Cherry-picked for 3.4.3.

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.

AnimationTree -> OneShot node don't have the UI to change parameters
7 participants