Blender通过ssh运行自定义脚本

时间:2018-04-11 13:19:02

标签: python blender

我为blender创建了以下自定义脚本 https://github.com/Korchy/Ozbend_Engraving_Internal

我试图通过SSH使用它 像这样

blender -b -P __init__.py

But im getting the following error
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2501:(snd_pcm_open_noupdate) Unknown PCM default
    AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Traceback (most recent call last):
  File "/home/solomio/public_html/engravingcreator/__init__.py", line 19, in <module>
    from . import engraving_internal_ops
SystemError: Parent module '' not loaded, cannot perform relative import

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

您尝试运行的“脚本”是一个插件。您不运行该脚本,安装并启用插件以向混合器添加额外功能。启用插件后,您可以运行运行其提供的运算符的python脚本,类似于任何内置运算符。

This answer显示了如何在后台运行blender时自动执行此操作,对于您链接的插件,下载repo的zip并将路径传递到zip文件addon_install

使插件执行的命令应为bpy.ops.engravinginternal.start()