diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-10-28 20:30:49 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-10-28 20:30:49 +0300 |
commit | 9a824ed39eda64693d2ebdf13298a3960e42a83d (patch) | |
tree | 0c2bf60ad63fb8d11b78175a23b7b71f548fe909 | |
parent | 3c670394b5eba10e348dacec80137c772fa40bd7 (diff) | |
parent | a927d3e1bca8a9d2c5e16932e32866954435cc7b (diff) |
Merge branch 'blender-v2.91-release'
-rw-r--r-- | blenderkit/blendfiles/material_thumbnailer_cycles.blend | bin | 2966715 -> 2974288 bytes | |||
-rw-r--r-- | blenderkit/download.py | 5 | ||||
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_mesh.py | 7 |
4 files changed, 8 insertions, 6 deletions
diff --git a/blenderkit/blendfiles/material_thumbnailer_cycles.blend b/blenderkit/blendfiles/material_thumbnailer_cycles.blend Binary files differindex fd71b79b..a4780345 100644 --- a/blenderkit/blendfiles/material_thumbnailer_cycles.blend +++ b/blenderkit/blendfiles/material_thumbnailer_cycles.blend diff --git a/blenderkit/download.py b/blenderkit/download.py index a80678fc..e3a69ea8 100644 --- a/blenderkit/download.py +++ b/blenderkit/download.py @@ -80,7 +80,8 @@ def check_missing(): def check_unused(): '''find assets that have been deleted from scene but their library is still present.''' - + #this is obviously broken. Blender should take care of the extra data automaticlaly + return; used_libs = [] for ob in bpy.data.objects: if ob.instance_collection is not None and ob.instance_collection.library is not None: @@ -96,7 +97,7 @@ def check_unused(): used_libs.append(ps.settings.instance_collection) for l in bpy.data.libraries: - if l not in used_libs: + if l not in used_libs and l.getn('asset_data'): print('attempt to remove this library: ', l.filepath) # have to unlink all groups, since the file is a 'user' even if the groups aren't used at all... for user_id in l.users_id: diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 2bd3ad67..e9a35a08 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, 5, 0), + "version": (1, 5, 1), '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 34e979b9..09ec325b 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py @@ -91,9 +91,10 @@ def do_primitives(gltf, mesh_idx, skin_idx, mesh, ob): num_cols = max(i, num_cols) num_shapekeys = 0 - for morph_i, _ in enumerate(pymesh.primitives[0].targets or []): - if pymesh.shapekey_names[morph_i] is not None: - num_shapekeys += 1 + if len(pymesh.primitives) > 0: # Empty primitive tab is not allowed, but some invalid files... + for morph_i, _ in enumerate(pymesh.primitives[0].targets or []): + if pymesh.shapekey_names[morph_i] is not None: + num_shapekeys += 1 # ------------- # We'll process all the primitives gathering arrays to feed into the |