-
Notifications
You must be signed in to change notification settings - Fork 319
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
Shapekeys names #362
Comments
FYI, glTF-Blender-Exporter accomplished this by setting glTF has no proper mechanism for naming morph targets, but this workaround is accepted in a few tools. |
^Probably the importer could use the same properties. |
Thanks for the reply. I'm trying to make Makehuman models into a ingame character generator for Godot. And it turned out about 200 shape keys. Without names, it's a nightmare. |
For sure! I agree with this feature request, I'm just adding more information for others to weigh in. :) |
@Lexpartizan, here's a temporary workaround: Before exporting, put this in the text editor and run it import bpy
for m in bpy.data.meshes:
target_names = [kb.name
for kb in (m.shape_keys.key_blocks if m.shape_keys else [])
if kb != kb.relative_key]
if target_names:
m['targetNames'] = target_names then when you export make sure the General > Custom Properties box is ticked. |
Thank you very much, it helped me a lot! |
OK, added it on my TODO list for importer |
Importer can now read extras data to name shapeKeys ( b3a78e0 ) |
@julienduroure 👍 |
@scurest Seems extras.targetNames is already used in some other few tools. |
No, what I mean is that the importer already uses those accessor names to set keyblock names glTF-Blender-IO/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py Lines 170 to 179 in b3a78e0
and since it does this after it sets from |
Ah, you're right, my test cases didn't have default weights for shape keys, so it was not overwritten. Will change it |
Hello, I am wondering on the status of getting this in the exporter. I would really appreciate having this functionality built into the blender 2.80 exporter. |
Importer part: targetNames has now priority in any cases |
could also really use the ability to export shape key names, preferably without the user having to run a script in blender first! :) thanks for the great work |
I'll work on exporter implementation. |
Opened #491, tests and/or reviews welcome. :) |
Shapekeys exported named like "Morph 0".
With glTF-Blender-Exporter i can myself name to shapekeys. Its very convenient.
The text was updated successfully, but these errors were encountered: