Search code examples
gimppython-fu

gimp preset "fixed: aspect ratio" property for a selection


I need a script that acts as a shortcut for:

  • making a selection
  • setting the selection property "Fixed" to value "Aspect ratio" (that is: proportions of selection should be fixed)

enter image description here

The following line does the selection part:

gimp.pdb.gimp_rect_select(img,20,20,80,80,2,0,0)

But I couldn't find the way to set the selection properties and so it just keep the properties of the last selection done.

Is there a way to accomplish this?


Solution

  • No you can't, because by design the scripts cannot interfere with the UI (and the "Fixed" setting is just a help for us humans, a script can compute this).

    But, if what you want to do it have a quick way to make a specific selection, then use the diskette icon at the bottom to save the Tool settings with a name (and, later, the folder icon, to restore it).