作为python模块支持Optix的Blender
bpy-optix的Python项目详细描述
搅拌机
Blender是一个python模块,易于安装
关于
用于安装到virtualenv或任何地方,用于编写Blender扩展的单元测试,或开发支持Blender 3d的Python应用程序。在
依赖于bpy-build
模块来确保搅拌机bpy
模块的环境是正确的。在
有关详细信息,请参阅:
入门
预构建的轮子是为流行的平台(MacOS、Windows和Ubuntu)提供的。预构建包括“正常”安装(bpy
)、CUDA(bpy-cuda
)和Optix(bpy-optix
)。选择正确的版本取决于您的用例和硬件,但一般来说,bpy
对于非渲染自动化任务应该是合适的,而{
安装
在这些平台上安装预构建的程序很简单。在
pip install bpy && bpy_post_install
自建
为您自己的平台构建Blender API可能很困难,但是这个repo应该可以让您轻松地手工创建自己的构建。在
从^{生成
您可以使用pip
从源发行版构建。在
先决条件
从sdist
执行构建至少需要构建Blender的先决条件。请参见the list of prerequisite applications的wiki。在
Windows
py -3.7-64 -m pip install --upgrade pip wheel future-fstrings
Other
^{pr2}$构建
Windows
py -3.7-64 -m pip install bpy --no-binary
Other
python3.7 -m pip install bpy --no-binary
从回购构建
您也可以在克隆存储库之后进行构建,这在开发过程中非常有用。在
先决条件
python3 -m pip install --upgrade pip wheel future-fstrings git clone https://github.com/TylerGubala/blenderpy.git
构建
如果您想要bpy
的特定版本,则必须更改bpy_<optional extra>_setup.py
文件开头的VERSION
字符串。在
要构建,请运行以下命令。在
Windowspy bpy_setup.py sdist bdist_wheel
Otherpython3 bpy_setup.py sdist bdist_wheel
dist文件夹中的结果控制盘可以使用pip安装。在
把你的任何错误都作为问题发表。在
常见问题解答
Q、 我得到了failed to find 'bpy_types' module
A.请参见issue #13
Q、 我得到了ImportError: DLL load failed: The specified module could not be found
Q、 如何导入加载项?
A.可以使用代码referenced here导入插件(Blender内部和第三方)。在
Q、 如何在multiprocessing
中使用搅拌机?
A.混合器运行时的使用和与multiprocessing
的兼容性受到限制,请参见the documentation。在
Q、 我选择的操作系统呢?
A.MacOS support is on its way。之后是Ubuntu。在
Q、 我选择的Python版本呢?
答:如果你有你想要的API的特定版本,你必须自己做一些构建。同样,如果您被限制使用特定的Python版本(尤其是那些未由python.org网站)那你就得努力培养自己。在
哥查斯
目前,除了windowspython3.6.x之外,我还没有在其他平台上进行测试。很快还会有更多。在
- 项目
标签: