Skip to content
Snippets Groups Projects
Commit 173e9d32 authored by Campbell Barton's avatar Campbell Barton
Browse files

fix [#27916] Crash adding EdgeSplit/Bevel modifier to imported lwo mesh

parent 34680d1f
No related branches found
No related tags found
No related merge requests found
...@@ -1193,6 +1193,12 @@ def build_objects(object_layers, object_surfs, object_tags, object_name, add_sub ...@@ -1193,6 +1193,12 @@ def build_objects(object_layers, object_surfs, object_tags, object_name, add_sub
layer_data.morphs.clear() layer_data.morphs.clear()
layer_data.surf_tags.clear() layer_data.surf_tags.clear()
# We may have some invalid mesh data, See: [#27916]
# keep this last!
print("validating mesh: %r..." % me.name)
me.validate(verbose=1)
print("done!")
# With the objects made, setup the parents and re-adjust the locations. # With the objects made, setup the parents and re-adjust the locations.
for ob_key in ob_dict: for ob_key in ob_dict:
if ob_dict[ob_key][1] != -1 and ob_dict[ob_key][1] in ob_dict: if ob_dict[ob_key][1] != -1 and ob_dict[ob_key][1] in ob_dict:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment