短い質問しかありません。現在、Blender のアドオンを作成しています。すべて正常に動作しますが、現在の Blender-Scene に頂点と面を追加しようとすると、次のエラーが発生しました。
File "/usr/lib/blender/scripts/modules/bpy_types.py", line 378, in <listcomp>
vertices_flat = [f for v in vertices for f in v]
TypeError: 'numpy.float32' object is not iterable
編集:ここにコードがあります:
def add2Scene(self,verts):
print("Adding object to current scene")
triMesh = bpy.data.meshes.new("MCIsosurface")
triMesh.from_pydata(verts , [], self.faces)
triObj = bpy.data.objects.new("MCIsosurface", triMesh)
#triObj.setLocation(0,0,0)
bpy.context.scene.objects.link(triObj)
print("done")