It is currently Mon Jun 03, 2024 6:36 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Can't get plugin to appear (mostly)
PostPosted: Mon Feb 26, 2024 3:35 pm  (#1) 
Offline
New Member

Joined: Oct 24, 2019
Posts: 3
Windows 10, GIMP 2.10.36

I have a basic plugin in my own directory (which has been added to the preferences) - and also one I've downloaded, in the same directory.

The one I've downloaded appears and works, my own doesn't appear (except once or twice it has but as soon as I made a change it vanished again).

I'm a very experienced coder (50 years) many different languages though not Python, but I get it: indent-based formatting with spaces not tabs.

I have scoured my code to ensure there's no tabs.

The example script I downloaded was AutomatedJpgToXcf from gimp[.]org/tutorials (system won't let me use the URL, I'm new therefore it must be spam). I made one change to make it appear on a new menu called "Automation" so it goes with the one I'm trying to write

And here's mine:

#! /usr/bin/env python
#
#
############################################################################
#
from gimpfu import *
import os
import re
#
def generate_listing_images(srcPath, tgtPath):
    pdb.gimp_message ('Hello')
#
############################################################################
#
register (
    "python-fu-generate-listing-images",    # Name registered in Procedure Browser
    "Generates listing images",             # Description
    "Generate listing images blah blah blah blah blah blah blah bl",
    "Steve Turnbull",           # Author
    "Steve Turnbull",           # Copyright Holder
    "February 2024",            # Date
    "Generate listing images",  # Menu Entry
    "",                         # Image Type - No image required
    [
        ( PF_DIRNAME, "srcPath", "Designs directory", "" ),
        ( PF_DIRNAME, "tgtPath", "Listings directory", "" ),
    ],
    [],
    generate_listing_images,    # Matches to name of function being defined
    menu = "<Image>\Automation" # Menu Location
    )

main()


When I run GIMP the imported plugin appears. Mine doesn't.

This is extremely frustrating ... help?


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: Can't get plugin to appear (mostly)
PostPosted: Mon Feb 26, 2024 4:17 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Nov 04, 2015
Posts: 1348
did you make your script executable? on linux it's just a tick box but you gotta have it.


Top
 Post subject: Re: Can't get plugin to appear (mostly)
PostPosted: Mon Feb 26, 2024 4:46 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Dec 26, 2014
Posts: 198
Change the back slash to a forward slash

menu = "<Image>\Automation"

Should be

menu = "<Image>/Automation"

It now works for me


Top
 Post subject: Re: Can't get plugin to appear (mostly)
PostPosted: Mon Feb 26, 2024 5:17 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4749
https://www.gimp-forum.net/Thread-Debug ... in-Windows

_________________
Image


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Baby's first GEGL plugin - a very basic GEGL plugin anyone can make.

9

No new posts Attachment(s) Plugin Potrace

11

No new posts Attachment(s) eps plugin crashes

4

No new posts Attachment(s) Plugin superxBR

7

No new posts Attachment(s) Help! What's the plugin called?

7



* Login  



Powered by phpBB3 © phpBB Group