1

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コンソールを見ると、それは正しいようです...私の方法のエラーが関数呼び出しにない限り...

4

1 に答える 1

2

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
)
于 2011-11-21T13:47:15.100 に答える