![]() |
Plugin won't show in menu - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: Plugin won't show in menu (/Thread-Plugin-won-t-show-in-menu) |
Plugin won't show in menu - n3306tx - 03-23-2025 Hello. First off, I am not a coder, but years ago I managed to write a plugin in GIMP 2.10 to do some basic repetitive tasks like adding solid color layers with masks, in groups and set other various parameters. The first thing that happens is the original image layer is copied and desaturated. Honestly, I am struggling with rewriting this simple plug-in in GIMP 3 format...I can't even get anything to show up in the GIMP menus even after copying the code from another GIMP 3 plugin example. Running it line by line through the python console produces no error. Could someone look at this basic code to copy a layer, create a new layer and desaturate it and help me understand why I can't even get the plugin to show up in the GIMP menus? I wish there was a GIMP 2 to 3 converter or a forum group that would help rewrite code specifically for us non-coders. I just don't understand enough on how to write python code when I cannot find examples to do basic tasks. Thanks for any feedback you can provide. The code is attached [attachment=13224] RE: Plugin won't show in menu - Ofnuts - 03-23-2025 When I start Gimp in a terminal: Code: Traceback (most recent call last): ... but that's only the beginning ![]() ![]() A version that works (see the ### for explanations) Code: #!/usr/bin/env python3 RE: Plugin won't show in menu - n3306tx - 03-23-2025 Ofnuts, thank you very much for the help and explanations. It works great and is much appreciated. But it seems this new python 3 structure is just beyond my old brain's capabilities to understand the coding logic. So for now I'm going to have to hang on to GIMP 2 to run my full plugin to prep my projects then take the project over to GIMP 3 to complete until I can figure out how to completely convert the basic tasks code to GIMP 3 format in my plugin. I do appreciate you taking your time to help me out with this basic desaturate function. RE: Plugin won't show in menu - Ofnuts - 03-24-2025 (03-23-2025, 11:38 PM)n3306tx Wrote: Ofnuts, thank you very much for the help and explanations. It works great and is much appreciated. But it seems this new python 3 structure is just beyond my old brain's capabilities to understand the coding logic. So for now I'm going to have to hang on to GIMP 2 to run my full plugin to prep my projects then take the project over to GIMP 3 to complete until I can figure out how to completely convert the basic tasks code to GIMP 3 format in my plugin. I do appreciate you taking your time to help me out with this basic desaturate function. My brain is probably older than yours. |