-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
GLTF: Make skeleton bone names unique per-skeleton instead of scene-wide #106537
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
GLTF: Make skeleton bone names unique per-skeleton instead of scene-wide #106537
Conversation
b372da3
to
832ce66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not review the code.
Approve of the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good for glTF
832ce66
to
850a5be
Compare
850a5be
to
8350919
Compare
Thanks! |
EDIT: There's a config option at the bottom of the import settings under glTF, called Naming Version. It needs to be set to "Godot 4.5 or later". I think it preserved the 4.3-4.4 naming when I opened an old project. This works great, thank you so much!
|
Fixes #106073, fixes #93758, fixes #96248. This restores the behavior in Godot 4.2 and earlier.
This PR makes the unique name feature no longer apply cross-skeleton. Skeleton bones now need to be unique within the same skeleton and compared to scene nodes, but not compared to all skeletons in the scene node.
This only affects glTF files with multiple skeletons in it, which is a niche use case, so this is low-risk. Users of this feature expect to be able to use the same bone map for each skeleton for animation targeting.
Note: This PR makes it possible to generate multiple nodes with the same name in the case of BoneAttachment3D nodes, since they are given the same name as the bone they are attached to. I think this is fine, and the alternatives are worse.
Note: This PR does not affect export. A comment introduced in PR #53114 indicates the current export behavior of having all glTF nodes including bones be unique was intentional. We could change the export behavior too, though.
Note: This PR adds aduplicate()
function to HashSet, because I needed to duplicate a HashSet.