From fef8f1ffdb1f026bf79585f76579dfe9b47da18e Mon Sep 17 00:00:00 2001
From: Julien Duroure <julien.duroure@gmail.com>
Date: Fri, 22 Apr 2022 21:22:19 +0200
Subject: [PATCH] glTF exporter: add general material hook for unlit materials

---
 io_scene_gltf2/__init__.py                                   | 2 +-
 io_scene_gltf2/blender/exp/gltf2_blender_gather_materials.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 43dc21989..049574ac2 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -4,7 +4,7 @@
 bl_info = {
     'name': 'glTF 2.0 format',
     'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin SchmithĂĽsen, Jim Eckerlein, and many external contributors',
-    "version": (3, 2, 31),
+    "version": (3, 2, 32),
     'blender': (3, 1, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials.py
index 3805e9bd0..56c3acff3 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials.py
@@ -41,6 +41,7 @@ def gather_material(blender_material, active_uvmap_index, export_settings):
 
     mat_unlit = __gather_material_unlit(blender_material, active_uvmap_index, export_settings)
     if mat_unlit is not None:
+        export_user_extensions('gather_material_hook', export_settings, mat_unlit, blender_material)
         return mat_unlit
 
     orm_texture = __gather_orm_texture(blender_material, export_settings)
-- 
GitLab