It is currently Thu Jul 04, 2024 5:16 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Creating svg gradients for Gimp (python script 3 functions).
PostPosted: Tue Nov 01, 2016 5:48 pm  (#41) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
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.

_________________
TinT


Top
 Post subject: Re: Creating svg gradients for Gimp (python script 3 functions).
PostPosted: Tue Nov 01, 2016 6:18 pm  (#42) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 4514
Location: Sydney Australia
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 :(

_________________
Image

Respect should be offered freely but hard earned


Top
 Post subject: Re: Creating svg gradients for Gimp (python script 3 functions).
PostPosted: Tue Nov 01, 2016 7:08 pm  (#43) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
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).

_________________
Image


Top
 Post subject: Re: Creating svg gradients for Gimp (python script 3 functions).
PostPosted: Tue Nov 01, 2016 10:53 pm  (#44) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 4514
Location: Sydney Australia
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:

_________________
Image

Respect should be offered freely but hard earned


Top
 Post subject: Re: Creating svg gradients for Gimp (python script 3 functions).
PostPosted: Wed Nov 02, 2016 6:12 am  (#45) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
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
   (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

   (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)),

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Creating svg gradients for Gimp (python script 3 functions).
PostPosted: Tue Nov 08, 2016 12:15 am  (#46) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
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).


Top
 Post subject: Re: Creating svg gradients for Gimp (python script 3 functions).
PostPosted: Tue Nov 08, 2016 12:23 am  (#47) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
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.

_________________
TinT


Top
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Eager to learn how to draw pixel functions in GIMP python

2

No new posts Attachment(s) Scripting GEGL functions

52

No new posts Attachment(s) Learning to do first Python script

6

No new posts .py script not showing under Python-Fu

3

No new posts Attachment(s) My first Python Script for Gimp

7



* Login  



Powered by phpBB3 © phpBB Group