Skip to content

Commit

Permalink
Fix #2321
Browse files Browse the repository at this point in the history
Export SK when apply modifiers with only Armature modifier
  • Loading branch information
julienduroure committed Aug 18, 2024
1 parent 46eec18 commit 74c3481
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ def prepare_data(self):
# even if we apply modifiers
# (For classic objects, shape keys are not preserved if we apply modifiers)
# We can check it by checking if the mesh is used by a user
if self.blender_mesh.shape_keys and self.export_settings['gltf_morph'] and self.blender_mesh.users != 0:
# But ... in case we apply modifiers with only armature, the mesh is not used by a user
# But SK are still there
if self.blender_mesh.shape_keys and self.export_settings['gltf_morph'] and \
(self.blender_mesh.users != 0 or ( self.armature is not None and self.blender_mesh.users == 0)):
self.key_blocks = get_sk_exported(self.blender_mesh.shape_keys.key_blocks)

# Fetch vert positions and bone data (joint,weights)
Expand Down

0 comments on commit 74c3481

Please sign in to comment.