Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Re: Creating svg gradients for Gimp (python script 3 functions).

Tue Nov 01, 2016 5:48 pm

That looks like a GUI problem.
Did you recently install something that might change GUI? Like maybe a plug-in that tries to change the Interface.
The script has no control over that I might be wrong but could it be the plug-in that allows you to scroll through inputs do that? I don't have it installed so i don't know.

Re: Creating svg gradients for Gimp (python script 3 functions).

Tue Nov 01, 2016 6:18 pm

Tin - thanks for a quick response.

I install plug-ins regularly but I am not aware of anything intended to 'change the GUI' as you stated. But somewhere I vaguely remember reading a forum post recently about python script GUIs so that they fit the GIMP screen.

I have noticed though that the GUI form for Ofnuts 'path inbetweener' has also suddenly changed to two entry columns, but it is not 'distorted'.

Last plug-ins loaded were MQ's 'Simple path shapes' and Ofnuts 'erase background'.

I will keep looking to see what I come up with ... if anything :(

Re: Creating svg gradients for Gimp (python script 3 functions).

Tue Nov 01, 2016 7:08 pm

dinasset wrote:I mean the sub-folder where to store the created gradients.
You had (old version) : filename = "~\\.gimp-2.8\\gradients\\" + gradient_name + ".svg"
I changed it for myself to : filename = "~\\.gimp-2.8\\gradients\\SVG\\" + gradient_name + ".svg"
but having the subfolder name as a parameter in the panel could be more flexible


Using '~/.gimp-2.8/' by itself is wrong, the code should be using 'gimp.directory' which points to the right place on all platforms.

To allow other places or subdirectories, Tin should investigate having the script look for a .ini file (no too hard to do, see the addonCollectionManager or my guides presets for examples).

Re: Creating svg gradients for Gimp (python script 3 functions).

Tue Nov 01, 2016 10:53 pm

Tin - not found the problem yet but it does not exist on my laptop version of GIMP. Given the dates for plug-in downloads that means only the last fortnight needs to be checked out. I will do that tonight.

EDIT - OK, it seeems that I have located the problem (using all the knowledge I gained 45 years ago as a globally renowned 'assembler guru' :hehe :yes )

Forum post 29 on viewtopic.php?f=9&t=14742&start=60 - it seems that I was one of just 6 who have downoaded and installed gimpfu-col as recommended. Unfortunately it seems to works with some python scripts but not others.

Probably i should have realised it was just for 'programmers or scripters' - :oops:

Re: Creating svg gradients for Gimp (python script 3 functions).

Wed Nov 02, 2016 6:12 am

oldmangrumpy wrote:Tin - not found the problem yet but it does not exist on my laptop version of GIMP. Given the dates for plug-in downloads that means only the last fortnight needs to be checked out. I will do that tonight.

EDIT - OK, it seeems that I have located the problem (using all the knowledge I gained 45 years ago as a globally renowned 'assembler guru' :hehe :yes )

Forum post 29 on viewtopic.php?f=9&t=14742&start=60 - it seems that I was one of just 6 who have downoaded and installed gimpfu-col as recommended. Unfortunately it seems to works with some python scripts but not others.

Probably i should have realised it was just for 'programmers or scripters' - :oops:

You should be able to solve this problem by changing "SLIDERS" to "SPINNERS"

Example
Change
Code:
   (PF_SLIDER, "stop_at", "Stop At Percentage:", 50, (0, 100, 1)),
    (PF_COLOR, "stop_color", "Stop Color:", (128,128,128)),
    (PF_SLIDER, "stop_opacity", "Stop Opacity:", 100, (0, 100, 1)),


to

Code:
   (PF_SPINNER, "stop_at", "Stop At Percentage:", 50, (0, 100, 1)),
    (PF_COLOR, "stop_color", "Stop Color:", (128,128,128)),
    (PF_SPINNER, "stop_opacity", "Stop Opacity:", 100, (0, 100, 1)),

Re: Creating svg gradients for Gimp (python script 3 functions).

Tue Nov 08, 2016 12:15 am

Are these modifications possible ?

1. An option to add multiple stops at once.
2. Make The percentage slider a big wider (its a bit fiddly at the current size).
3. Option to recall plug-in with Ctrl + Shift + F (as in filters).

Re: Creating svg gradients for Gimp (python script 3 functions).

Tue Nov 08, 2016 12:23 am

I am afraid the only option i can add is turning it into a spinner so you can enter a number for percentage.
I don't know if i can control GIMP to run last filter since it isn't a filter and it needs the gradient that it's on to be passed in.
and I can't control how wide the percentage bar is. at least i don't know how.
Each stop needs percentage,color,opacity (those 3 things) defined .. If I add multiple the option window would look overly repetative if I add a toggle to add it or not then each stop will have 4 things and the window would get long really fast.
Post a reply