标题中几乎有问题。 源代码我到目前为止:
from gimpfu import *
def add_stuff(watermark, opacity, footer, file_out):
pass
register(
'add-stuff',
N_('Adds stuff'),
'Adds watermark and Footer',
'Malte Fischer',
'AM-Solutions',
'2019',
_('Add Stuff'),
'*',
[
(PF_STRING,"watermark","Watermark","Path of the watermark image"),
(PF_INT,"opacity","Opacity","Opacity of the Watermark"),
(PF_STRING,"footer","Footer","Path of the footer image"),
(PF_STRING,"file_out","Output","Output path and name of the image")
],
[],
add_stuff,
menu = "<Image>/Filters/")
main()
将其保存在{gimp安装} /lib/gimp/2.0/plug-ins/add-stuff/add-stuff.py
下提前谢谢
答案 0 :(得分:0)
语法错误:
Traceback (most recent call last):
File "/home/me/Code/Gimp/Foreign/Activated/baddie.py", line 13, in <module>
_('Add Stuff'),
NameError: name '_' is not defined
更多提示:
compose
command可以使您的工作变得更容易。plug-ins
目录中,而不是污染Gimp安装树。在OSX / Linux上,您还可以将文件放在任何地方(与测试数据一起在其自己的目录中,等等),并将其链接放在同一plug-ins
目录中。