私はGimp: python script not showing in menuにいて、それは私を助けませんでした。GimpメニューにPython-fuスクリプトが表示されない
1.私.bashrc
ファイルが
alias gimp='/Applications/GIMP.app/Contents/MacOS/GIMP --verbose --console-messages '
が含まれて私はgimp
とコマンドラインからのMac OS X 10.9.5上のGimp 2.8.16を実行している:ここで私は、ステップバイステップを試みたものです私は端末の出力を見て、私はたくさんのメッセージを見るが、何も問題として飛び出すことはない(ここでダンプをしたいの?)。私は最初にEnabling internal Python...
のようにそれが良いはずですので、参照してください。
2.フィルター>のPython-Fuのは>コンソールが
GIMP 2.8.16 Python Console
Python 2.7.8 (default, Dec 5 2015, 09:38:54)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
>>>
-SOと、コンソールが表示されます、再び、Pythonが動作しているようです。
this tip hereのため、私はPythonスクリプトを実行しようとしました。画像を開き、フィルタ>レンダリング>雲>霧を実行しました。作品の魅力のように - ウィンドウが解雇されたときに、私はいくつかの型変換の警告を得るか、コンソールで:私は自分のコンピュータを検索し、ので、これはPythonが動作していることを証明しているfoggify.pyが/Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/plug-ins/foggify.py
に実際にある
** (foggify.py:30312): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'
** (foggify.py:30312): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'
** (foggify.py:30312): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
、スクリプトをロードしているわけではありません。私foggify.py
だけで77行、ない30312.
4. GIMP>設定>フォルダ>スクリプトを持っていると少し混乱しているGIMPはスクリプトの以下のディレクトリをロードする必要があります示しています
/Users/julio/Library/Application Support/GIMP/2.8/scripts
/Applications/GIMP.app/Contents/Resources/share/gimp/2.0/scripts
私は」 /Applications/GIMP.app/Contents/Resources/share/gimp/2.0/scripts
を使用していませんが、*.scm
個のファイルがたくさんあります(したがって、おそらくSchemeにすべて含まれています)。私はここに何も追加したことはありません。 ls -l "/Users/julio/Library/Application Support/Gimp/2.8/scripts"
利回り
total 8
-rwxr-xr-x 1 julio staff 654 25 Jun 16:25 minimal.py
(何もない)
6.ここにあります私のminimal.py
:
5.は、私は単一のスクリプトを持って
#!/usr/bin/env python
from gimpfu import *
def minimal():
pass
register(
"python_fu_minimal", # plugin name
"Minimal plug-in example", # blurb (short description)
"Show the smallest possible Python plug-in example", # help (long description)
"Michael Schumacher", # author
"Michael Schumacher", # copyright info
"2007", # date
"<Image>/Tools/Minimal", # menu position and label
None, # image types accepted
[], # input parameters
[], # output (results)
minimal # method to call
)
main()
7。実行中上記のscripts
ディレクトリには、minimal.py
がすでにと表示されており、[ツール]メニューの[最小]項目は表示されません。
また、私はどちらか動作しませんでした、下記のバリエーションを試してみました:
#!/usr/bin/env python
from gimpfu import *
def minimal():
pass
register(
"python_fu_minimal", # plugin name
"Minimal plug-in example", # blurb (short description)
"Show the smallest possible Python plug-in example", # help (long description)
"Michael Schumacher", # author
"Michael Schumacher", # copyright info
"2007", # date
"Minimal", # menu position and label
None, # image types accepted
[], # input parameters
[], # output (results)
minimal, # method to call
menu="<Image>/Tools"
)
main()
GIMPスクリプティングへようこそ。あなたが私のプロフィールでGIMPの回答をチェックするなら、もっと多少のヒントがあるかもしれません。 – jsbueno