It is currently Thu Jul 04, 2024 5:17 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Always open PDB from Python console not Help -> Procedure Browser
PostPosted: Sat Dec 10, 2016 1:25 am  (#1) 
Offline
GimpChat Member

Joined: Nov 08, 2016
Posts: 45
I was reading a tutorial and it said that the Gimp user could double-click a procedure in the PDB and a statement for that function would be created in the Python console (underscores and all). That sounded neat, but it didn't work for me. Nothing happened.

>>>pdb.gimp_desaturate_full(drawable, desaturate_mode)


But I figured it out. If you open the PDB from the Python Console, it works :-) Besides double-click, there is an "Apply" button. It works differently if you open from Help -> Procedure Browser. I usually start with the PDB to find something... and then wanting to try it out, I'd open the Python Console. To be honest, it is documented: https://docs.gimp.org/en/gimp-filters-python-fu.html, but it didn't sink in until I started using it.

New to Gimp Python scripting should definitely use the PDB from the Python Console, if using Python.
I see script-fu also has a browse from the console.

One suggestion for the Procedure Browser: a checkbox to exclude deprecated functions. It would eliminate 188 procedures or a little over 13%.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Always open PDB from Python console not Help -> Procedure Browser
PostPosted: Sat Dec 10, 2016 4:07 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2438
vA+6Q-Hv[BX] wrote:
....One suggestion for the Procedure Browser: a checkbox to exclude deprecated functions. It would eliminate 188 procedures or a little over 13%.


If you start Gimp with compatibility off then the deprecated procedures are not shown.

gimp --pdb-compat-mode=off

_________________
Image


Last edited by rich2005 on Sun Dec 11, 2016 6:27 am, edited 1 time in total.

Top
 Post subject: pdb-compat-mode=off breaks xsane plugin
PostPosted: Sat Dec 10, 2016 11:12 pm  (#3) 
Offline
GimpChat Member

Joined: Nov 08, 2016
Posts: 45
I changed the gimp desktop file command to:
gimp-2.8 %U --no-splash --pdb-compat-mode=off

Cool. The option got rid of all deprecated functions except two (script-fu-copy-visible, script-fu-selection-round).

Update:

Using "--pdb-compat-mode=off" broke the XSane plugin.

By broke, I mean, no scanned image appeared and there was an error in the Gimp log, "Calling error for procedure 'gimp-image-add-layer':
Procedure 'gimp-image-add-layer' not found". If I remove the option, all is fine. Oh well...


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Procedure Browser Crashes

4

No new posts Attachment(s) Plugin Browser Crashes

20

No new posts GIMP 2.10 console etc Macbook

0

No new posts Attachment(s) how to automate the procedure?

14

No new posts Attachment(s) check if the procedure is correctly done?

6



* Login  



Powered by phpBB3 © phpBB Group