Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Fu
#4
This is because you are using the "old style" registration model (where the 7th arg is the complete menu path).

Code:
register(
    id,
    desc,help,
    author,author,'2023',
    '<Image>/Test/The menu item',  # Full menu path
    imageFilter,
    [argsIn],
    [argsOut],
    function
    )

In the new style, the 7th arg is only the menu item label, and there is an additional keyword argument menu= that specifies the menu hierarchy:

Code:
register(
    id,
    desc,help,
    author,author,'2023',
    'The menu item',  # Menu label
    imageFilter,
    [argsIn],
    [argsOut],
    function,
    menu='<Image>/Test'  # Menu hierarchy
    )

and when you use it, the image/drawable parameters are no longer implicit, and must be specified. But they are set automatically from current Image/drawable and are not shown  in the parameter dialog when Gimp can figure them out.
Reply


Messages In This Thread
Python Fu - by DoggoOfSpeed - 06-07-2023, 12:03 PM
RE: Python Fu - by programmer_ceds - 06-07-2023, 04:35 PM
RE: Python Fu - by DoggoOfSpeed - 06-07-2023, 05:52 PM
RE: Python Fu - by Ofnuts - 06-07-2023, 09:52 PM

Forum Jump: