diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2022-09-21 23:24:58 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2022-09-22 12:05:47 +0300 |
commit | 06ad75f38d7c568553ffe1a4c37cf7049f0c3e92 (patch) | |
tree | 281e81c584bcffa470362c51c2778ff68a9dcd79 | |
parent | 2290fb31da3348846e37fd0d927fe25588c84849 (diff) |
glTF exporter: avoid crash when apply modifiers + shapekeys
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_extract.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index c61241ea..b3327fd3 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, 3, 30), + "version": (3, 3, 31), 'blender': (3, 3, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py index 93947acb..61906ba0 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py @@ -81,7 +81,8 @@ def extract_primitives(blender_mesh, uuid_for_skined_data, blender_vertex_groups use_morph_tangents = use_morph_normals and use_tangents and export_settings[gltf2_blender_export_keys.MORPH_TANGENT] key_blocks = [] - if blender_mesh.shape_keys and export_settings[gltf2_blender_export_keys.MORPH]: + # Shape Keys can't be retrieve when using Apply Modifiers (Blender/bpy limitation) + if export_settings[gltf2_blender_export_keys.APPLY] is False and blender_mesh.shape_keys and export_settings[gltf2_blender_export_keys.MORPH]: key_blocks = [ key_block for key_block in blender_mesh.shape_keys.key_blocks |