ofnuts wrote:
ecs1749 wrote:
ofnuts wrote:
There are no default parameters (actually, there is one for the runmode, as a keyword parameter, as done in python for parameters with default values, but you never use it). So, yes, you have to look up parameters (in the Python console, hit the "Browse..." button and all the doc is there).
There is neither a one-to-one relationship between UI actions and API calls. Many UI actions require several API calls (the oppoiste is sometimes true, too).
That makes it unnecessarily hard. I am building my own wrapper and as time go on, I will end up with my own set of "easy" wrappers.
amount=1.0
radius=0.5
myWaveletSharpen(image, drawable, amount, radius)
saturation=10
myHueSaturation(drawable,saturation)
It doesn't try to be hard but to be general. Your default values are not necessarily mine. Writing "helper" functions or defining constants for things you use often is a fairly basic concept.
Obviously. That's why we define parameters with a default value but can be overwritten with whatever value you wish to use. There are plenty of GIMP parameters I have no clue what they do (and most likely don't care). Most of them do come with a default value recommended by the plugin author. I don't ever change them anyway. So, why not just
def myHueSaturation(drawable,saturation,hue_range=0,hue_offset=0,lightness=0):
pdb.gimp_hue_saturation(drawable, hue_range, hue_offset, lightness, saturation)
return
so I can simply do:
myHueSaturation(drawable,saturation=10)
There are literally hundreds and thousands of GIMP functions and God know how many parameters. I am sure it's too late now to do anything about it.