Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

GMIC in the menu

Thu May 07, 2020 8:21 pm

Not sure if anyone has GMIC at the top of their menu in Gimp. Just came across this script: https://discuss.pixls.us/t/integrate-gm ... mp/10183/4

I also think it's a plugin as well. It's from 2018.

Re: GMIC in the menu

Thu May 07, 2020 8:40 pm

Thank you for sharing, mackenzie it worked, I like it. It's easy to access, instead of going to the bottom of the Filters menu. :bigthup

Image

Re: GMIC in the menu

Thu May 07, 2020 9:22 pm

Pocholo wrote:Thank you for sharing, mackenzie it worked, I like it. It's easy to access, instead of going to the bottom of the Filters menu. :bigthup

[ Image ]


You're welcome Pocholo. My only questions are, can it still be accessed if GMIC is deleted from the Filters menu and will the .scm file be updated when GMIC gets updated?

Re: GMIC in the menu

Thu May 07, 2020 9:35 pm

I've done this trick a while back but it got obliterated over time with all the GIMP updates. lolol

Cool sharing that info, Mackenzieh; may try doing this again since I hate to have to scroll down all the time (usually only have to do this once since I go to filter history thereafter; lol). :)

Re: GMIC in the menu

Thu May 07, 2020 9:43 pm

lylejk wrote:I've done this trick a while back but it got obliterated over time with all the GIMP updates. lolol

Cool sharing that info, Mackenzieh; may try doing this again since I hate to have to scroll down all the time (usually only have to do this once since I go to filter history thereafter; lol). :)


You're welcome, Lyle.

Re: GMIC in the menu

Thu May 07, 2020 10:35 pm

mackenzieh wrote:
Pocholo wrote:Thank you for sharing, mackenzie it worked, I like it. It's easy to access, instead of going to the bottom of the Filters menu. :bigthup

[ Image ]


You're welcome Pocholo. My only questions are, can it still be accessed if GMIC is deleted from the Filters menu and will the .scm file be updated when GMIC gets updated?


No, it won't work. You still will have it on top but the tab will be grey out. Once you update to the newer G'MIC version it will still work. This is real neat!

Re: GMIC in the menu

Fri May 08, 2020 1:17 am

Pocholo wrote:
mackenzieh wrote:
Pocholo wrote:Thank you for sharing, mackenzie it worked, I like it. It's easy to access, instead of going to the bottom of the Filters menu. :bigthup

[ Image ]


You're welcome Pocholo. My only questions are, can it still be accessed if GMIC is deleted from the Filters menu and will the .scm file be updated when GMIC gets updated?


No, it won't work. You still will have it on top but the tab will be grey out. Once you update to the newer G'MIC version it will still work. This is real neat!


So, the GMIC in the bottom of the filters menu can't be removed even if you have the .scm script?

Re: GMIC in the menu

Fri May 08, 2020 2:26 am

@ Mackenzieh
This method cannot be used (if you wanted, you must edit the pluginrc file).

The menu is grayed out only when no image is open.
This does not replace the original location in the Filters/G'mic-Qt menu, it just adds a new item on the top bar (typical "shortcut").
Until recently (before Ofnuts tips) I didn't notice that there are two ways to register: "old" which will not work in the future Gimp-3.0 and recommended "new" (menu-register as a separate entry).
For convenience revised python and script-fu (for today's and future versions of Gimp) in the attachment.
You should decide - what to choose: script-fu (*.scm) or Python plugin (*.py).

Python code:
Code:
#!/usr/bin/env python
#-*- coding: utf-8 -*-

# based on the idea "Gimpscripter" https://github.com/bootchk/gimpscripter
from gimpfu import *

def python_fu_faves_gmic_qt(image, drawable):

  pdb.plug_in_gmic_qt( image, drawable, 0, 0, 0, run_mode=RUN_INTERACTIVE)
 
register(
   "python_fu_faves_gmic_qt", 
   "Shortcut to favourite plugins",
   "This plugin was created using 'GimpScripter...",
   "Bootchk - modified MareroQ",
   "GPL",
   "2020",
   "G'MIC QT..",
   "RGB*, GRAY*",
   [
      (PF_IMAGE, "image", "Input image", None),
      (PF_DRAWABLE, "drawable", "Input drawable", None),
   ],
   [],
   python_fu_faves_gmic_qt, menu="<Image>/G'MIC"
   ) 

main()


Script-fu code:
Code:
(define (script-fu-gmic-faves-location image drawable)
   (plug-in-gmic-qt 0 image drawable 1 1 "")
)

(script-fu-register "script-fu-gmic-faves-location"
   "G'MIC-Qt..."
   "Shortcut to call G'MIC from Gimp main menu"
   "MrQ"
   "GPL"
   "2020"
   "RGB*, GRAY*"
   SF-IMAGE    "Image"     0
   SF-DRAWABLE "Drawable"  0
   )
(script-fu-menu-register "script-fu-gmic-faves-location" "<Image>/G'MIC")

Re: GMIC in the menu

Fri May 08, 2020 3:55 am

Thanks MareroQ, but for me it's also easy to change pluginrc (just once, when a new release appears).
At least in my Samj' pack.

Re: GMIC in the menu

Fri May 08, 2020 11:06 pm

Hi Diego.

Not every user likes to perform such operations. :hehe
This gives you the choice: editing pluginrc or adding a simple plugin.
Your post has mobilized me for another attempt - editing the pspirc file (because I have too many entries from * .8bf files on the Filters menu).
Using Notepad ++ means 5 seconds of editing.
And it works as expected.

Re: GMIC in the menu

Fri May 08, 2020 11:12 pm

Fine !
I did almost the same when using Photoshop filters.
Post a reply