It is currently Thu Jun 04, 2026 3:58 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Question: Scheme Script Fu default values refresh.
PostPosted: Wed May 11, 2016 10:47 am  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4469
Location: Canada
okay I got this SF-OPTION right now
SF-OPTION     "Color Curves Preset" (strbreakup (car (python-fu-get-color-curves-presets-names 1)) ",")

It's just an option that calls a python-fu to get a comma separated string and shows it as options.
The problem is that this is only ran once as default.
It doesn't run again when i call the script again unless i Script-Fu/Refresh_Scripts.

Is there away to always make it run so that my SF-OPTION always shows fresh values?

Like for example if you had an SF-ADJUSTMENT and defaulted value is 10, and user selects 20, next time you run script the value stays at 20, is there a way to make it always 10, if there's away to do that i think it would solve my problem.

I ask this because my python-fu returns comma separated list of color curve preset names, and then that SF-OPTION number can be passed to another python-fu which reads color curves information at the proper index. So if user makes another preset, currently my scheme will have to be refreshed to get the new list.

_________________
TinT
My GIMP 2.10 plug-in writer Fiverr Gig
Plaid Community Forum
Imageplaid-patterns.com


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: Question: Scheme Script Fu default values refresh.
PostPosted: Wed May 11, 2016 5:22 pm  (#2) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14011
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
trandoductin wrote:
okay I got this SF-OPTION right now
SF-OPTION     "Color Curves Preset" (strbreakup (car (python-fu-get-color-curves-presets-names 1)) ",")

It's just an option that calls a python-fu to get a comma separated string and shows it as options.
The problem is that this is only ran once as default.
It doesn't run again when i call the script again unless i Script-Fu/Refresh_Scripts.

Is there away to always make it run so that my SF-OPTION always shows fresh values?

Like for example if you had an SF-ADJUSTMENT and defaulted value is 10, and user selects 20, next time you run script the value stays at 20, is there a way to make it always 10, if there's away to do that i think it would solve my problem.

I ask this because my python-fu returns comma separated list of color curve preset names, and then that SF-OPTION number can be passed to another python-fu which reads color curves information at the proper index. So if user makes another preset, currently my scheme will have to be refreshed to get the new list.

I haven't a clue. :puzzled

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Question: Scheme Script Fu default values refresh.
PostPosted: Wed May 11, 2016 7:12 pm  (#3) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
There is no way to do this as the values for all parameters are calculated at scrip load time, not script run time.

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Question: Scheme Script Fu default values refresh.
PostPosted: Wed May 11, 2016 8:27 pm  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4469
Location: Canada
RobA wrote:
There is no way to do this as the values for all parameters are calculated at scrip load time, not script run time.

-Rob A>

interesting...but python-fu calculates it at run-time? because i defined a function that does the same thing for a python-fu, it seems to grab the all the updated values (what's even more interesting is the option is left as the same last chosen option but with the new values added into it's right places, i thought this was totally unexpected like almost too friendly not complaining, i just thought it would load up defaulting to the first value).

_________________
TinT
My GIMP 2.10 plug-in writer Fiverr Gig
Plaid Community Forum
Imageplaid-patterns.com


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group