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

Fix description of Animation::copy_track #83441

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented Oct 16, 2023

The documentation stated the track was added to this, instead of to_animation

As per the code:

void Animation::copy_track(int p_track, Ref<Animation> p_to_animation) {
ERR_FAIL_COND(p_to_animation.is_null());
ERR_FAIL_INDEX(p_track, get_track_count());
int dst_track = p_to_animation->get_track_count();
p_to_animation->add_track(track_get_type(p_track));
p_to_animation->track_set_path(dst_track, track_get_path(p_track));
p_to_animation->track_set_imported(dst_track, track_is_imported(p_track));
p_to_animation->track_set_enabled(dst_track, track_is_enabled(p_track));
p_to_animation->track_set_interpolation_type(dst_track, track_get_interpolation_type(p_track));
p_to_animation->track_set_interpolation_loop_wrap(dst_track, track_get_interpolation_loop_wrap(p_track));
if (track_get_type(p_track) == TYPE_VALUE) {
p_to_animation->value_track_set_update_mode(dst_track, value_track_get_update_mode(p_track));
}
for (int i = 0; i < track_get_key_count(p_track); i++) {
p_to_animation->track_insert_key(dst_track, track_get_key_time(p_track, i), track_get_key_value(p_track, i), track_get_key_transition(p_track, i));
}
}

The documentation stated the track was added to this, instead of
`to_animation`
@AThousandShips AThousandShips added bug documentation topic:animation cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Oct 16, 2023
@AThousandShips AThousandShips added this to the 4.2 milestone Oct 16, 2023
@AThousandShips AThousandShips requested a review from a team as a code owner October 16, 2023 12:39
@akien-mga akien-mga requested a review from a team October 16, 2023 12:43
Copy link
Member

@SaracenOne SaracenOne left a comment

Choose a reason for hiding this comment

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

Yep, LGTM 👍

@akien-mga akien-mga merged commit c20e948 into godotengine:master Oct 24, 2023
15 checks passed
@AThousandShips AThousandShips deleted the anim_doc branch October 24, 2023 08:55
@akien-mga
Copy link
Member

Thanks!

@AThousandShips
Copy link
Member Author

Thank you!

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jan 23, 2024
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.4.

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.

Misleading description for Animation::copy_track
4 participants