[Bf-extensions-cvs] [9e7404ce] master: glTF importer: restore setting extra to mesh custom properties

Julien Duroure noreply at git.blender.org
Tue Oct 20 22:34:05 CEST 2020


Commit: 9e7404ce614d0a4b2e66bbb449f3b17025a27fb8
Author: Julien Duroure
Date:   Tue Oct 20 22:33:38 2020 +0200
Branches: master
https://developer.blender.org/rBA9e7404ce614d0a4b2e66bbb449f3b17025a27fb8

glTF importer: restore setting extra to mesh custom properties

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/imp/gltf2_blender_mesh.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 1f9dfe61..4e105b69 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 ef26a1a5..34e979b9 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:



More information about the Bf-extensions-cvs mailing list