-
Notifications
You must be signed in to change notification settings - Fork 320
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
Export: write custom attribute arrays for non-skinning vgroups #1515
base: main
Are you sure you want to change the base?
Export: write custom attribute arrays for non-skinning vgroups #1515
Conversation
We can't remove it, it will lead to miss cache in some situation |
#vertex_groups = None | ||
modifiers = None | ||
else: | ||
# Check if there is an armature modidier | ||
if len([mod for mod in blender_object.modifiers if mod.type == "ARMATURE"]) == 0: | ||
vertex_groups = None # Not needed if no armature, avoid a cache miss | ||
#vertex_groups = None # Not needed if no armature, avoid a cache miss |
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.
This can lead to miss cache
Ok, cool, so this PR should wait until your work there on custom caches is done? If I understand #1245 is the ticket to watch. |
It does not require a custom cache. It will also not cause a cache miss: if there are non-skinning vgroups, this branch always exports them, so since the vgroups are always used, it is correct that they are always part of the cache key. But I don't think it is good that they are always exported. If it's desirable to merge these features into mainline, I think they should be behind an export option, cf #1232 (comment). |
BTW, some other custom attribute can be exported, as requested by some blender devs. See #1505 Anyway, now that vertex groups are stored on mesh, no more on object, all this code needs (probably) to be refactored. |
Oh, that's right. |
Plus one to the idea of adding this feature to the official exporter (as an export option)! |
@julienduroure Are there any plans to do so? |
I've combined the facemap exports and vertex group exports from @scurest's work last year, and tested that this works on 3.0.0.
I haven't followed all of the changes and improvements since Nov 2020, however, so I'm not sure if this is still the ideal way to do things.
There are also a couple of places where a line of code has been commented out (e.g. gltf2_blender_gather_nodes.py has
#vertex_groups = None
in a couple of places). We should probably decide what we want to happen--either remove it, or improve it?#1232