我想将(x,y,z)坐标转换为水蟒的网格顶点。
这是我要在Anaconda上运行的代码:
import bpy
vertices=[(0,0,0),(0,1,0),(1,0,0),(1,1,1)]
Faces=[(0,1,2,3)]
EasyMeshVariable=bpy.data.meshes.new("MeshName")
EasyObjectVariable=bpy.data.objects.new("ObjectName",EasyMeshVariable)
EasyObjectVariable.location = bpy.context.scene.cursor_location
bpy.context.scene.objects.link(EasyObjectVariable)
EasyMeshVariable.from_pydata(Vertices,[],Faces)
但是我遇到了以下错误。
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-575093cfaedd> in <module>()
----> 1 import bpy
2 vertices=[(0,0,0),(0,1,0),(1,0,0),(1,1,1)]
3 Faces=[(0,1,2,3)]
4 EasyMeshVariable=bpy.data.meshes.new("MeshName")
5
EasyObjectVariable=bpy.data.objects.new("ObjectName",EasyMeshVariable)
ModuleNotFoundError: No module named 'bpy'
有人知道如何在Anaconda(Windows 10 x64)上安装bpy吗? 谢谢!