Skip to content

Commit

Permalink
Add "0 vertex group" sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunarexxy committed Aug 18, 2022
1 parent 9f90b78 commit 52fbcc0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sims4_to_TU_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ def execute(self, context):
if obj is None or obj.type != 'MESH' or obj.name == 'rig':
self.debug('FAILED: Mesh is not selected. Did you remember to delete the rig object with X?')
return {'CANCELLED'}
if len(obj.vertex_groups) == 0:
self.debug("FAILED: Selected mesh has no vertex groups.")
return {'CANCELLED'}
# (since i apparently can't set the name, i have to rely on new modifiers being called "VertexWeightMix")
if "VertexWeightMix" in obj.modifiers:
self.debug("FAILED: There's currently a modifier named VertexWeightMix on the model. Can't run script safely.")
Expand Down

0 comments on commit 52fbcc0

Please sign in to comment.