GIMP Script-FU - 错误:参数不足

发布于 2024-12-14 10:17:14 字数 1025 浏览 4 评论 0原文

GIMP 脚本-fu-新手在这里。

我在 GIMP 2.6 文档中看不到为什么这不起作用:

;Define the main function
(define (script-fu-rubber-stamp img drawable)
      (gimp-image-undo-group-start img)
      (plug-in-randomize-pick 1 img drawable 90 7 FALSE 10)
      (plug-in-oilify 1 img drawable 5 0)
      (gimp-image-undo-group-end img)
)

;Register the script w/ GIMP.
(script-fu-register
      "script-fu-rubber-stamp"            ;func name
      "Rubber Stamp"                      ;menu label
      "Image to rubberstamp"              ;description
      "Me"                                ;author
      "Copyright 2011, Me"                ;copyright notice
      "Nov. 2011"                         ;date created
      ""                                  ;image type that the script works on
)

(script-fu-menu-register "script-fu-rubber-stamp" "<Image>/Script-Fu")

它显示在 GIMP 中,但是当我运行它时,它说:

Error: not enough arguments

但是如果我查看 Script-FU 控制台,它似乎是正确的...除非我的方法的错误不在函数调用中...

GIMP script-fu-newbie here.

I can't see anywhere in the documentation of GIMP 2.6 why this shouldn't work:

;Define the main function
(define (script-fu-rubber-stamp img drawable)
      (gimp-image-undo-group-start img)
      (plug-in-randomize-pick 1 img drawable 90 7 FALSE 10)
      (plug-in-oilify 1 img drawable 5 0)
      (gimp-image-undo-group-end img)
)

;Register the script w/ GIMP.
(script-fu-register
      "script-fu-rubber-stamp"            ;func name
      "Rubber Stamp"                      ;menu label
      "Image to rubberstamp"              ;description
      "Me"                                ;author
      "Copyright 2011, Me"                ;copyright notice
      "Nov. 2011"                         ;date created
      ""                                  ;image type that the script works on
)

(script-fu-menu-register "script-fu-rubber-stamp" "<Image>/Script-Fu")

It shows up in GIMP, but when I run it, it says:

Error: not enough arguments

But if I look in the Script-FU Console, it seems the be right... unless the error of my ways is not in the functioncalls...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

咿呀咿呀哟 2024-12-21 10:17:14

ARGH 自然... script-fu-register 需要说明 img 和 drawable 是什么:

(script-fu-register
  "script-fu-rubber-stamp"            ;func name
  "Rubber Stamp"                      ;menu label
  "Image to rubberstamp"              ;description
  "Me"                                ;author
  "Copyright 2011, Me"                ;copyright notice
  "Nov. 2011"                         ;date created
  ""                                  ;image type that the script works on
  SF-IMAGE "Input Image" 0
  SF-DRAWABLE "Input Drawable" 0
)

ARGH naturally... script-fu-register needs to say what img and drawable is:

(script-fu-register
  "script-fu-rubber-stamp"            ;func name
  "Rubber Stamp"                      ;menu label
  "Image to rubberstamp"              ;description
  "Me"                                ;author
  "Copyright 2011, Me"                ;copyright notice
  "Nov. 2011"                         ;date created
  ""                                  ;image type that the script works on
  SF-IMAGE "Input Image" 0
  SF-DRAWABLE "Input Drawable" 0
)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文