I want to generate a mesh with this command I found in the API:
mesh.from_pydata(verts,[],currentFace)
But this gives me an Error:
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\modules\bpy_types.py", line 409, in from_pydata
self.loops.add(sum((len(f) for f in faces)))
File "C:\Program Files\Blender Foundation\Blender\2.72\scripts\modules\bpy_types.py", line 409, in <genexpr>
self.loops.add(sum((len(f) for f in faces)))
TypeError: object of type 'int' has no len()
I don't know why my script can not make a mesh from the variables verts and currentface, which are both lists. I also printed a line before to check their type again and whether they contain elements:
print(verts,currentFace)
>>>[[40.0, -10.0, 70.0], [40.0, 11.0, 80.0], [40.0, 11.0, 35.0], [40.0, -10.0, 30.0]]
>>>[0, 1, 2, 3]
Could someone help me out? Thanks.