Hi folks — I'm working on a plugin for GIMP 3.0 and running into a strange behavior with Gimp.ParamSpec.int.
When I define a property like seed with:
python
proc.add_argument(
Gimp.ParamSpec.int(
"seed",
"Seed",
"Seed value",
0, # min
9999, # max
9999, # default
Gimp.ParamFlags.READWRITE
)
)
I get this warning at plugin registration:
Warning: value "9999" of type 'gint' is invalid or out of range for property 'seed' of type 'gint'
min <= max => default
The default is clearly within the defined min/max bounds, and all three values (min, max, default) are legitimate. Strangely, the only setup that suppresses this warning is when all three values are **exactly the same** (we call it the triple x same bug), like:
python
0, 0, 0
or
1024, 1024, 1024
Even common combinations like:
python
0, 9999, 0
512, 2048, 1024
or:
python
0, 9999, 5000
cause the warning to appear and as a result, the plug-in is not registered. I’ve searched around but haven’t found an explanation. Is this a known quirk in GIMP’s plugin API? Are there hidden constraints on gint properties that aren’t documented?
Any ideas or workarounds would be appreciated!
Thanks ?
Olaf
When I define a property like seed with:
python
proc.add_argument(
Gimp.ParamSpec.int(
"seed",
"Seed",
"Seed value",
0, # min
9999, # max
9999, # default
Gimp.ParamFlags.READWRITE
)
)
I get this warning at plugin registration:
Warning: value "9999" of type 'gint' is invalid or out of range for property 'seed' of type 'gint'
min <= max => default
The default is clearly within the defined min/max bounds, and all three values (min, max, default) are legitimate. Strangely, the only setup that suppresses this warning is when all three values are **exactly the same** (we call it the triple x same bug), like:
python
0, 0, 0
or
1024, 1024, 1024
Even common combinations like:
python
0, 9999, 0
512, 2048, 1024
or:
python
0, 9999, 5000
cause the warning to appear and as a result, the plug-in is not registered. I’ve searched around but haven’t found an explanation. Is this a known quirk in GIMP’s plugin API? Are there hidden constraints on gint properties that aren’t documented?
Any ideas or workarounds would be appreciated!
Thanks ?
Olaf