Page MenuHome

mesh_utils.triangle_random_points fails with a TypeError.
Closed, ResolvedPublic


Blender Version
Broken: 2.80
Worked: 2.79

mesh_utils.triangle_random_points function fails with an error:

  File "/home/omar/projects/blender2.80/2.80/scripts/modules/bpy_extras/", line 459, in triangle_random_points
    area1 = area_tri(*tv[0])
TypeError: area_tri

Exact steps for others to reproduce the error
Execute the following script in a scene with an object:

import bpy
from bpy_extras import mesh_utils
mesh =[0].data
points = mesh_utils.triangle_random_points(100, mesh.loop_triangles)

It seems this bug was introduced in D3539.