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

Unexpected bone names because GLTF importer renames bones #43482

Closed
geneishouko opened this issue Nov 12, 2020 · 5 comments · Fixed by #47074
Closed

Unexpected bone names because GLTF importer renames bones #43482

geneishouko opened this issue Nov 12, 2020 · 5 comments · Fixed by #47074

Comments

@geneishouko
Copy link

Godot version:
3.2.3

OS/device including version:
Debian unstable

Issue description:
The GLTF importer renames bones on import in a process called "sanitization". It works by converting the bone name to some snake_case pattern that also muddles numbers. It probably solves a corner case but I don't think it should be applied every time. The problem is that I have to access the skeleton bones programmatically and the importer gets in the way by altering the data (bone names) I know.

I think an import option should be added to opt in to the bone name sanitization process.

Steps to reproduce:

  • Run the reproduction project and move the slider. It will fail because the expected bone name in the script isn't the actual imported bone name.

Minimal reproduction project:
GltfImporterRenamesBonese.zip

@fire
Copy link
Member

fire commented Nov 16, 2020

This doesn't look that hard to do. How important is this for you?

@geneishouko
Copy link
Author

It is very important because we rely a lot on bone manipulation with code not only animations. The current naming sanitization isn't guaranteed to remain constant and adapting our art library is very cumbersome. This is how we have patched it.

@fire
Copy link
Member

fire commented Nov 17, 2020

Can you write a proposal and I'll discuss with others?

I'll argue for verbatium names by default, but wanted to hear other opinions. @marstaik

@marstaik
Copy link
Contributor

There are some sanitizations that are required as they are not allowed to be in node names, IIRC.

The rest were to make injected fake bones consistent in the hierarchy, but I guess in practice it does not matter. We just have to enforce that the injected bone names are unique and make sense.

@fire
Copy link
Member

fire commented Mar 16, 2021

Can you check this?

#47074

@akien-mga akien-mga added this to the 4.0 milestone Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants