It is currently Tue Jun 23, 2026 2:58 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Parameters of a filter
PostPosted: Tue Jul 11, 2017 1:22 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
GIMP Version: 2.8.22
Operating System: Windows
GIMP Experience: Basic Level

List any relevant plug-ins or scripts:
DIEGO_COLOURS_StretchRGBColours2.py



In May I release the filter DIEGO_COLOURS_StretchRGBColours2 (in python).
When called from the menu interactively it shows my default values as 0.5...0.1.

Because today I wanted to use it from inside another (.py) filter, I looked into the PDB and I found the parameters as being "integers"

I wanted to call it using values such as those defaulted (0.5....0.1), but I got an execution error; I needed to call it using full integer values (1 - 0).
This was a "surprise" for my ignorance.
Hence my "help" request:
. how do I have to change my filter registration to have the possibility to call the filter from inside another filter using decimals?
The definition currently is as such:
Attachment:
FilterDEFINITION.PNG
FilterDEFINITION.PNG [ 33.05 KiB | Viewed 3024 times ]



Thanks a lot in advance

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Parameters of a filter
PostPosted: Tue Jul 11, 2017 1:24 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
sorry for not having attached also the snapshots of interactive call and PDB entry, but in the first post of a new thread GIMP-CHAT does currently not accept different attachments, only one.

_________________
"Where am I ?"


Top
 Post subject: Re: Parameters of a filter
PostPosted: Tue Jul 11, 2017 4:26 am  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Possibly a bug, when called with the auto-generated dialog, the PF_SPINNER/PF_ADJUSTMENT is a float (if only because you can specify a non-integer step), but when you call it from code, the argument converted to int.

Edit: actually a bug IMHO: https://bugzilla.gnome.org/show_bug.cgi?id=784788

_________________
Image


Last edited by ofnuts on Tue Jul 11, 2017 6:56 am, edited 1 time in total.

Top
 Post subject: Re: Parameters of a filter
PostPosted: Tue Jul 11, 2017 4:39 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14831
Location: roma, italy
Thanks ofnuts.
I was really confused.

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group