RSS/Atom feed Twitter
Site is read-only, email is disabled

How can I get tool option "Scale" for python-fu scripts?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

How can I get tool option "Scale" for python-fu scripts? Richter Huang 23 Apr 12:44
  How can I get tool option "Scale" for python-fu scripts? Joao S. O. Bueno 23 Apr 13:42
   How can I get tool option "Scale" for python-fu scripts? Richter Huang 24 Apr 15:28
Richter Huang
2008-04-23 12:44:06 UTC (over 16 years ago)

How can I get tool option "Scale" for python-fu scripts?

Hi,

I wrote a python-fu script for my private use that may enable me one-button-filter-applying during painting with brush. The script is thus; It firstly gets the current brushes' size, sets it as the radius of gaussian blur and applies blur, so that it may work non-interractively but it adjust itself flexiblly according to the painting condition.
But there's a problem. The procedure "gimp-brush-get-info" dosen't provide me with the actual brushes' size, since there's a option "Scale" in Tool Options dialog and I frequently change it. In addition I mainly use self-made pipe-brushes, which you cannot adjust within Brush Editor dialog.

Then, I came to two solutions of this problem: a) Getting the status of "Scale" in a certain way b) Reading lines from preserved preferences (text files) in "tool-options" directory with python

Choosing "a", I will have to know the right way how I can get the status. But I have entirely no idea though I read GIMP-Python Documentation; http://www.gimp.org/docs/python/index.html On the other hand "b" is an achievable way. But, files in "tool-options" directory are not seamlessly refreshed. They seem to be the just preservation of the last session of GIMP and I cannot refresh them except when the GIMP is completely quited or when "Save Tool Options Now" is clicked through "Toolbox > FIle > Preferencese > Tool Options".

Won't you please help me if you have any ideas about these two issues, how I can get the status "Scale" in tool options or how I can print the current status on certain files when I like? I'm sorry I know too little because I'm not any sort of coders.

Sincerely, Richter

Joao S. O. Bueno
2008-04-23 13:42:39 UTC (over 16 years ago)

How can I get tool option "Scale" for python-fu scripts?

On Wednesday 23 April 2008, Richter Huang wrote:

Hi,

I wrote a python-fu script for my private use that may enable me one-button-filter-applying during painting with brush. The script is thus; It firstly gets the current brushes' size, sets it as the radius of gaussian blur and applies blur, so that it may work non-interractively but it adjust itself flexiblly according to the painting condition.
But there's a problem. The procedure "gimp-brush-get-info" dosen't provide me with the actual brushes' size, since there's a option "Scale" in Tool Options dialog and I frequently change it. In addition I mainly use self-made pipe-brushes, which you cannot adjust within Brush Editor dialog.

Then, I came to two solutions of this problem: a) Getting the status of "Scale" in a certain way b) Reading lines from preserved preferences (text files) in "tool-options" directory with python

Choosing "a", I will have to know the right way how I can get the status. But I have entirely no idea though I read GIMP-Python Documentation; http://www.gimp.org/docs/python/index.html On the other hand "b" is an achievable way. But, files in "tool-options" directory are not seamlessly refreshed. They seem to be the just preservation of the last session of GIMP and I cannot refresh them except when the GIMP is completely quited or when "Save Tool Options Now" is clicked through "Toolbox > FIle > Preferencese > Tool Options".

Won't you please help me if you have any ideas about these two issues, how I can get the status "Scale" in tool options or how I can print the current status on certain files when I like? I'm sorry I know too little because I'm not any sort of coders.

Hi there,

as you have noted, currently the PDB API lacks some recent paint brush (and other tools) parameters (like jutter and scale). There is currently no work around this, as you have perceived.

Unfortunatelly the only thng I can think of right now is for your python-fu script to pop-up a self-created gtk+ dialog (non mandatroy, no modal), with an input field, wher one can type in the brush scale,, and keep the value in this field in a persistent file of its own between invocations.

Regards,

js ->

Sincerely,
Richter

Richter Huang
2008-04-24 15:28:59 UTC (over 16 years ago)

How can I get tool option "Scale" for python-fu scripts?

On Wednesday 23 April 2008, Joas S. O. Bueno wrote:

Hi there,

as you have noted, currently the PDB API lacks some recent paint brush (and other tools) parameters (like jutter and scale). There is currently no work around this, as you have perceived. Unfortunatelly the only thng I can think of right now is for your python-fu script to pop-up a self-created gtk+ dialog (non mandatroy, no modal), with an input field, wher one can type in the brush scale,, and keep the value in this field in a persistent file of its own between invocations.

Hi, thanks a lot for your reply.
I see what you mentioned.
I wish someday some cool coders will deal with the part of PDB API that I want. And I, personally, will try again to find another way to make a useful shortcut.

Right now I use a particular script which just batches the python-fu file inputting numbers through a dialog. This is, however, not so diffrent from normal gaussian blur and Ctrl+F repetition. (lol

Sincerely,