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 info about global library in add_animation_library method docs #93818

Merged
merged 1 commit into from
Jul 1, 2024
Merged

Fix info about global library in add_animation_library method docs #93818

merged 1 commit into from
Jul 1, 2024

Conversation

ashish0kumar
Copy link
Contributor

@ashish0kumar ashish0kumar commented Jul 1, 2024

The information about how to add a Global library is not in the documentation currently.

This PR adds the following information in the add_animation_library method
in doc/classes/AnimationMixer.xml:
"When name is set to an empty string, the Global library is added."

@ashish0kumar ashish0kumar requested a review from a team as a code owner July 1, 2024 15:28
@AThousandShips AThousandShips added this to the 4.x milestone Jul 1, 2024
@AThousandShips AThousandShips requested a review from a team July 1, 2024 15:30
Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

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

Is there a case where I need to manually add a global library? It seems to me that this is rather a prohibited method with that argument.

AnimationMixer has a global library by default with an empty string as key, so if you want to add an animation to the global library, you can write the following.

var global_lib = mixer.get_animation_library("")
global_lib.add_animation("name", animres)

If anything is missing in the documentation, it is this code.

@ashish0kumar
Copy link
Contributor Author

So, I should remove the info I added, and instead add this code in the description. Am i right?

@TokageItLab
Copy link
Member

Please squash the commits to follow PR workflow https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html#the-interactive-rebase

@akien-mga akien-mga changed the title Fix Info about Global library on add_animation_library method in docs Fix info about global library in add_animation_library method docs Jul 1, 2024
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jul 1, 2024
…classes/AnimationMixer.xml

Fix Info about Global library on add_animation_library method in doc/classes/AnimationMixer.xml

Fix Info about Global library on add_animation_library method

Co-authored-by: Silc Lizard (Tokage) Renew <tokage.it.lab@gmail.com>
@akien-mga akien-mga merged commit 070dddf into godotengine:master Jul 1, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@ashish0kumar ashish0kumar deleted the add/doc/global-lib-info-add_animation_library branch July 2, 2024 09:29
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.

Info about Global library on add_animation_library method
5 participants