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

Allow renaming bones and blendshapes. #42827

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

lyuma
Copy link
Contributor

@lyuma lyuma commented Oct 15, 2020

The blend shape renaming feature will be used to implement custom glTF blend shape naming extensions. I have already developed an import helper using this feature in 3.2 based on the VRM glTF extension based on @fire 's code.

The bone renaming feature can enable scripts to provide rig normalization, among other things.

Due to the simplicity of implementation, I don't see a reason why further justification for the feature is needed, but I would be happy to discuss the use-cases in more detail if requested.

Attached I have a sample project which contains a tool script at Tools -> "Rename bone or blendshape" that replaces the first bone (if Skeleton3D selected) or the first blendshape (if MeshInstance3D selected) with the current datetime:
BlendShapeBoneRename
Sample project here: BlendshapeBoneRename.zip
Source code for GDScript tool available here: https://gist.github.com/lyuma/c707c74486a74112bc5a2791dda92154

((Notes about sample project:
Because importers in master branch haven't implemented blendshapes yet, this script does a hack to add a new blendshape if none exist, and it does display in the Console window.
Also, the tool script throws errors on the final print due to some GDScript glitches I keep running into, but the rename does work. I'll try and report those as separate bugs.))

Bugsquad edit:
Fixes: godotengine/godot-proposals#1672

@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:core labels Oct 15, 2020
@Calinou Calinou added this to the 4.0 milestone Oct 15, 2020
@fire fire self-requested a review November 18, 2020 04:12
@akien-mga akien-mga requested a review from reduz November 18, 2020 08:11
@reduz
Copy link
Member

reduz commented Nov 27, 2020

I am not the code owner of this so I have no idea about it, I think @JFonS was going to work more on it also.
When we rename nodes, animation tracks are renamed automatically. Should it not happen also here too?

@fire
Copy link
Member

fire commented Nov 27, 2020

It makes sense that animation tracks are also renamed.

@akien-mga akien-mga requested a review from JFonS December 3, 2020 13:19
@akien-mga akien-mga requested review from a team and removed request for JFonS, reduz and AndreaCatania March 31, 2021 22:19
@akien-mga
Copy link
Member

I'll merge as it's been reviewed by @fire already, and is otherwise sitting in limbo. :)

@akien-mga akien-mga merged commit c2b7c69 into godotengine:master Mar 31, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Apr 29, 2021
@GeorgeS2019
Copy link

GeorgeS2019 commented May 8, 2021

@akien-mga I am using the latest Godot 4 master branch (Today), git cloned and compiled for mono and uploaded the VRM and it seems the blendshapes are still not correctly labeled as expected w.r.t. to Unity.

@fire timely feedback from him. I will check other models (non VRM) with blendshapes with the latest Godot 4 version.

@fire
Copy link
Member

fire commented May 8, 2021

This is not a bug related to Godot Engine's gltf2 import.

VRM does not use the "defacto standard" blendshape naming.

@MJacred MJacred mentioned this pull request Jul 19, 2022
39 tasks
@lyuma lyuma deleted the rename_bones_blendshapes branch May 19, 2023 10:48
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.

Allow renaming bones and blendshapes
6 participants