04-06-2025, 11:01 AM
Thanks to HoneyBadger at GIMP Discord:
HoneyBadger wrote 2025-04-05T06:28:14.224Z about getting the name of operations like 'gimp:threshold-alpha' and 'gegl:gaussian-blur':
You can extract the names of operations from the filters applied to the layer:
HoneyBadger wrote 2025-04-04T21:04:43.798Z about adding all properties of a filter at once in stead of one by one:
It turns out the documentation is not complete, the method really exists
You can use it like this:
But if the property name contains a hyphen, you will have to do it differently:
Or:
You can even mix them together if you want:
HoneyBadger wrote 2025-04-05T06:28:14.224Z about getting the name of operations like 'gimp:threshold-alpha' and 'gegl:gaussian-blur':
You can extract the names of operations from the filters applied to the layer:
Code:
Gimp.get_images()[0].get_layers()[0].get_filters()[0].get_operation_name()
HoneyBadger wrote 2025-04-04T21:04:43.798Z about adding all properties of a filter at once in stead of one by one:
It turns out the documentation is not complete, the method really exists
You can use it like this:
Code:
config.set_properties(prop1=value1, prop2=value2)
But if the property name contains a hyphen, you will have to do it differently:
Code:
my_props = {
'std-dev-y': 3,
'std-dev-x': 3
}
config.set_properties(**my_props)
Or:
Code:
config.set_properties(**{ 'std-dev-y': 3, 'std-dev-x': 3 })
You can even mix them together if you want:
Code:
config.set_properties(filter='auto', **{ 'std-dev-y': 3, 'std-dev-x': 3 })