Gimp-Forum.net
Installing Plugins and Scripts - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Installing Plugins and Scripts (/Thread-Installing-Plugins-and-Scripts)



Installing Plugins and Scripts - Leopardo-40 - 03-19-2025

Good evening to the entire Forum.
I am a new member of this Forum but I have been using Gimp for several years, where I am part of several Forums (GimpChat, is an example) in the field.
I want to migrate to Gimp 3.0, but I don't want to lose some of the Scripts and Plug-ins that I have in Gimp 2.10.38, so my question is.
Where and how do I place the Plug-ins? and the Scripts? from Ofnuts In 2.10.38 I know, but in this new one, I'm confused.
Thanks..


RE: Installing Plugins and Scripts - Ofnuts - 03-19-2025

Plug-ins (binaries and Python) you have for 2.10 won't work in 3.0. They have to be rewritten/converted(*).  And in the general case this also applies to any non-trivial script-fu script.

(*) For Python, because the GIMP API has changed, but also because we go from Python v2 to Python v3 and the language is a bit different (for the better, I'd say)


RE: Installing Plugins and Scripts - Leopardo-40 - 03-19-2025

I mean, Scripts like this, (ofn-bend-path) or other Phats you have don't work on 3.0.0?


RE: Installing Plugins and Scripts - Ofnuts - 03-20-2025

(03-19-2025, 09:57 AM)Leopardo-40 Wrote: I mean, Scripts like this, (ofn-bend-path) or other Phats you have don't work on 3.0.0?

No, until I rewrite them for v3 (i have already done some). Takes one hour for the easy ones, OBP should be about a day. But last I checked support for paths in auto-generated dialogs was not there.


RE: Installing Plugins and Scripts - Leopardo-40 - 03-20-2025

Thanks for the explanation


RE: Installing Plugins and Scripts - iiey - 03-23-2025

Hi Ofnuts,

I also have similar issue with shellOut.py (using of nikCollection) when switching from v2.x to v3.x.

Could you please point me to the general instructions for rewriting the script for compatibility?
Sorry, I'm a newbie here, and it's still hard to find a thread or post on this topic that may already exist.

Thank you in advance for your help!


RE: Installing Plugins and Scripts - Ofnuts - 03-23-2025

(03-23-2025, 08:20 PM)iiey Wrote: Hi Ofnuts,

I also have similar issue with shellOut.py (using of nikCollection) when switching from v2.x to v3.x.

Could you please point me to the general instructions for rewriting the script for compatibility?
Sorry, I'm a newbie here, and it's still hard to find a thread or post on this topic that may already exist.

Thank you in advance for your help!

Here: https://testing.developer.gimp.org/resource/writing-a-plug-in/


RE: Installing Plugins and Scripts - iiey - 03-24-2025

(03-23-2025, 08:27 PM)Ofnuts Wrote: Here: https://testing.developer.gimp.org/resource/writing-a-plug-in/

Thank you very much for the quick response! The "Hello World" example did help a lot for understanding how plug-ins works.
I still struggle with this part in the register() function of v2.x which opens a popup-menu with RATIO and OPTION choices.

Here is the code snippet which can show ShellOut in Filters/ menu but still missing the functionality, I took a look in v3.0 API but got confuse..

Code:
def plugin_main(procedure, run_mode, image, n_drawables, drawables, config, data):
  ...

class ShellOut(Gimp.PlugIn):

   def do_query_procedures(self):
       return [PROC_NAME]

   def do_create_procedure(self, name):
       procedure = Gimp.ImageProcedure.new(self, name,
                                          Gimp.PDBProcType.PLUGIN,
                                          plugin_main, None)
       
       procedure.set_image_types("RGB*, GRAY*")
       procedure.set_menu_label("ShellOut...")
       procedure.set_attribution(AUTHOR, COPYRIGHT, DATE)
       procedure.set_documentation(HELP, DOC, None)

       procedure.add_menu_path("<Image>/Filters/ShellOut...")

       # FIXME: How to open menu and get return values and pass into main_plugin()?
       
       return procedure

Gimp.main(ShellOut.__gtype__, sys.argv)

Could you help me out here? ? Thank you again!

Best regards,


RE: Installing Plugins and Scripts - iiey - 03-24-2025

Sorry, for hijack this thread. The discussion could get longer, so I moved it to a separated thread for shellout script:

https://www.gimp-forum.net/Thread-Converting-python-plugin-in-shellout-py-from-gimp-2-x-to-3-x