Skip to content

Commit

Permalink
added check for shape keys
Browse files Browse the repository at this point in the history
If static mesh has shapekeys, imports as SKM. Affix will also reflect being an skm
  • Loading branch information
JoshQuake committed Feb 14, 2025
1 parent 1d3b503 commit 9937b06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/addons/send2ue/core/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ def get_mesh_unreal_type(mesh_object):
"""
has_parent_rig = mesh_object.parent and mesh_object.parent.type == BlenderTypes.SKELETON
rig = get_armature_modifier_rig_object(mesh_object)
if has_parent_rig or rig:
has_shapekey = mesh_object.active_shape_key
if has_parent_rig or rig or has_shapekey:
return UnrealTypes.SKELETAL_MESH
return UnrealTypes.STATIC_MESH

Expand Down
5 changes: 5 additions & 0 deletions src/addons/send2ue/resources/extensions/affixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ def add_affixes():
mesh_object,
properties.extensions.affixes.static_mesh_name_affix
)
elif mesh_object.active_shape_key:
append_affix(
mesh_object,
properties.extensions.affixes.skeletal_mesh_name_affix
)
else:
append_affix(mesh_object, properties.extensions.affixes.static_mesh_name_affix)

Expand Down

0 comments on commit 9937b06

Please sign in to comment.