Search code examples
user-interfaceparametersgimppython-fu

GIMP, python-fu: How to disable "Input image" and "Input drawable"


i am confused a little about the art of how gimp generates the gui for python plug-ins.

gimp generates two, for my script, needless fields. "Input image" and "Input drawable". how can i disable them?

I didn't find anything about it in the standart documetation.

my register method:

register(
  "fixPngColors",
  "fixPngColors",
  "fixPngColors",
  "Author",
  "Author",
  "2013",
  "<Image>/plug-ins/BATCH PNG Color Fix",
  "",
  [
  (PF_DIRNAME, "png_input_directory", "Png directory(INPUT)", ""),
  (PF_DIRNAME, "png_output_directory", "Png directory(OUTPUT)", ""),
  (PF_INT, "c_count", "Max Colors", "255"),
  ],
  [],
  launcher
  )

like you can see, nothing about the other two.


Solution

  • It's because of

    "<Image>/plug-ins/BATCH PNG Color Fix",
    

    in the register function!

    Had the same Problem. Move the menu to another place like

    "<Toolbox>/MyScripts/BATCH PNG Color Fix",
    

    and you dont need an input image anymore.

    If you place an plug-in under "Image", Gimp assumes you need an image and a drawable as input. This seems to override everything else.