KhronosGroup / glTF-Blender-IO

Blender glTF 2.0 importer and exporter
https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html
Apache License 2.0
1.5k stars 319 forks source link

How and where I can modify UV order and UV number via hooks? #2358

Open Pancir opened 1 month ago

Pancir commented 1 month ago

Hi there, I need to remove and reorder some UV channels while exporting and my original objects in scenes should not be modified. I have tried to find a suitable hook but without any luck at this moment. Any suggestions? Thank you.

scurest commented 1 month ago

Did you try gather_mesh_hook?

Pancir commented 1 month ago

I looked at some of the code related to this hook and I'm not sure if my task can be easily and correctly done there, but I could be wrong. There are complex gather functions before that hook run. In my opinion it is better to have an ability to modify mesh before it is processed. I have inserted my own hook and I was able to solve my task, but it is not a good idea to patch the code in the addons which are included in the Blender. patch