-
Notifications
You must be signed in to change notification settings - Fork 323
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 import alters scene hierarchy for skinned items #1652
Comments
Hello,
|
@julienduroure Thank you for the insight. I had a suspicion it would be by convention. We may look into a small modification ourselves then, would imp\gltf2_blender_node.py be the place to start looking? Any recommendations/suggestions? Thanks again. If we get anywhere we'll shoot a PR back for review. |
This is done for correctness. The main reason is it achieves the glTF requirement that only the joints in its skin (not the node where it is instantiated) affects the transform of a skinned mesh. The notion of a skinned mesh being a child of LOD_0 and affected by LOD_0's transforms does not exist in glTF. The place where it is actually moved is move_skinned_meshes. node.py and mesh.py files also currently assume an arma will have been created before the mesh it affects, and mesh.py skins meshes into its arma space on the assumption it will be a child of the arma. |
No issue here, not sure there is something that can be done. Closing. Don't hesitate to comment if you want to add some extra infos. |
Describe the bug
When importing a GLTF file in Blender, it forces all objects that are skinned to a specific Armature to be children of that Armature in the hierarchy.
Contextual image:
The left side shows the scene how it was constructed in blender natively.
The right side shows that same scene after being saved to gltf, and then imported again into a new empty scene in Blender.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The scene hierarchy of the objects shall be preserved. They must not be force-moved to be in the hierarchy under the skeleton, but remain where they were.
.blend file/ .gltf
cubeBones.zip
Version
Additional context
This may be by convention and design, as we noticed the FBX import does this also. However, it is critical for us that the actual structure is maintained. We were also able to determine that the gltf export accurately writes this hierarchy correctly, only during the import into blender does this reshuffling happen.
Ideally this would be an optional boolean toggle to disable this default behaviour.
The text was updated successfully, but these errors were encountered: