Skip to content
Snippets Groups Projects
Commit 12f80524 authored by Alexander N's avatar Alexander N
Browse files

fix: potentially division by zero in case of no weights

parent 110da24b
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ bl_info = {
'description': "Import / Export MilkShape3D MS3D files"\
" (conform with MilkShape3D v1.8.4)",
'author': "Alexander Nussbaumer",
'version': (0, 95, 0),
'version': (0, 95, 1),
'blender': (2, 65, 3),
'location': "File > Import & File > Export",
'warning': "",
......
......@@ -392,7 +392,10 @@ class Ms3dExporter():
for weight in weights:
weight_sum += weight
weight_normalize = 1.0 / weight_sum
if weight_sum > 0.0:
weight_normalize = 1.0 / weight_sum
else:
weight_normalize = 1.0
weight_sum = 1.0
for index, weight in enumerate(weights):
......
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