问题是在标题漂亮多了。源代码,我有这么远:
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救了它
先感谢您
语法错误:
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 profile目录。在OSX / Linux的,你也可以(用测试数据,等等...在自己的目录,一起)把文件的任何地方,并把一个链接在同一plug-ins
directory。