ndee85 / coa_tools

COA Tools is a 2D Animation Suite for blender. It offers a 2D cutout animation workflow similar to programs like spine or spriter.
GNU General Public License v3.0
908 stars 139 forks source link

Too many vertices when filling a mesh will result in a division-by-zero error #106

Open koradir opened 6 years ago

koradir commented 6 years ago
Traceback (most recent call last):
  File "C:\Users\koradir\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\coa_tools\operators\edit_mesh.py", line 681, in execute
    if not self.triangulate_fill(context):
  File "C:\Users\koradir\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\coa_tools\operators\edit_mesh.py", line 542, in triangulate_fill
    average_edge_cuts(bm,obj)
  File "C:\Users\koradir\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\coa_tools\operators\edit_mesh.py", line 93, in average_edge_cuts
    edges_len_average, shortest_edge = get_average_edge_length(bm,obj)
  File "C:\Users\koradir\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\coa_tools\operators\edit_mesh.py", line 78, in get_average_edge_length
    edges_len_average = edges_len_average/edges_count
ZeroDivisionError: division by zero

location: <unknown location>:-1

I was tracing a fairly large sprite with a 0.10 stroke distance setting. Upping that to 0.20 resolved the issue.