diff options
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_gltf.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_primitive.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py index 1bccf9a2..6d2181fc 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py @@ -278,7 +278,7 @@ class BlenderGlTF(): mesh.is_weight_animated = False # Calculate names for each mesh's shapekeys - for mesh in gltf.data.meshes: + for mesh in gltf.data.meshes or []: mesh.shapekey_names = [] used_names = set() diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py b/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py index dcdd0ac8..8ebee354 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_primitive.py @@ -81,7 +81,7 @@ class BlenderPrimitive(): bme_verts.ensure_lookup_table() # Add edges/faces to bmesh - mode = pyprimitive.mode or 4 + mode = 4 if pyprimitive.mode is None else pyprimitive.mode edges, faces = BlenderPrimitive.edges_and_faces(mode, indices) # NOTE: edges and vertices are in terms of pidxs! for edge in edges: |