From 9e7404ce614d0a4b2e66bbb449f3b17025a27fb8 Mon Sep 17 00:00:00 2001
From: Julien Duroure <julien.duroure@gmail.com>
Date: Tue, 20 Oct 2020 22:33:38 +0200
Subject: [PATCH] glTF importer: restore setting extra to mesh custom
 properties

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

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 1f9dfe615..4e105b69f 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,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": (1, 4, 35),
+    "version": (1, 4, 36),
     'blender': (2, 91, 0),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
index ef26a1a5e..34e979b9f 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py
@@ -48,6 +48,7 @@ def create_mesh(gltf, mesh_idx, skin_idx):
     try:
         tmp_ob = bpy.data.objects.new('##gltf-import:tmp-object##', mesh)
         do_primitives(gltf, mesh_idx, skin_idx, mesh, tmp_ob)
+        set_extras(mesh, gltf.data.meshes[mesh_idx].extras, exclude=['targetNames'])
 
     finally:
         if tmp_ob:
-- 
GitLab