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

Script Mod Requests

Fri Feb 26, 2016 12:44 pm

I use the "Smart Seperate Sharpening, V2.8" script a lot and wanted an option to make it more useful to me.
The script produces 4 separate layers above the working layer, which is great for some instances for fine tuning.

Unfortunately the bulk of my usage involves:
  • Turning off all other layers
  • Creating a "New From Visible" layer from the 4 layers of the script
  • Deleting those 4 layers
  • Adjusting the opacity of the created sharpened layer
  • Merge down

Would anyone be interested in adding an option to forgo the separate layers and combining into a single layer, so it could be used in both ways?
I went to the website listed in the script, but it is no longer there.

Re: Script Mod Requests

Fri Feb 26, 2016 1:13 pm

I'm currently using python, and I am too old to easily switch from one Language to another one, even if used previously.
But here there are a lot of excellent scheme-Writers, so I hope you will get some attention.

Re: Script Mod Requests

Fri Feb 26, 2016 4:49 pm

dinasset wrote:I'm currently using python, and I am too old to easily switch from one Language to another one, even if used previously.
But here there are a lot of excellent scheme-Writers, so I hope you will get some attention.


Thanks for looking!
I figured this would be easy for the script gurus, but no biggie if no one is up for it.

I was also wondering if it would be possible to script opening a path in Inkscape.
ie..
R-Click a path in gimp and have an option to open in Inkscape.
I realize this might be OS dependent, not to mention the need for Inkscape, but I thought it would be a useful plugin.
There are lots of time where I need to break apart a path in gimp, or other extended path functions. It's not a huge deal to open Inkscape manually and copy/paste the path. I'm just always thinking of ways to speed up my workflow. :P

Re: Script Mod Requests

Fri Feb 26, 2016 5:41 pm

There is a shellout.py plugin which opens images externally. But as it stands it wont do this. Perhaps it could be modified.

On the other option Gimp currently supports (from the path dialogue) "Export Path". This can create a file which can be opened in inkscape (just tried it GIMP 2.8.14)

Re: Script Mod Requests

Fri Feb 26, 2016 6:20 pm

jazzon wrote:There is a shellout.py plugin which opens images externally. But as it stands it wont do this. Perhaps it could be modified.

On the other option Gimp currently supports (from the path dialogue) "Export Path". This can create a file which can be opened in inkscape (just tried it GIMP 2.8.14)


I wasn't aware of the shellout script. Will have to look into that.
I am familiar with the export option but am trying to avoid creating any new files for a simple path manipulation. I usually just copy/paste between the apps.
It's a shame that gimp turns buggy on most paths imported this way, but it usually works out.

Re: Script Mod Requests

Fri Feb 26, 2016 9:05 pm

akovia wrote:I was also wondering if it would be possible to script opening a path in Inkscape.
Export to SVG can include Gimp paths.

Re: Script Mod Requests

Sat Feb 27, 2016 9:28 am

akovia wrote:I use the "Smart Seperate Sharpening, V2.8" script a lot and wanted an option to make it more useful to me.
The script produces 4 separate layers above the working layer, which is great for some instances for fine tuning.

Unfortunately the bulk of my usage involves:
  • Turning off all other layers
  • Creating a "New From Visible" layer from the 4 layers of the script
  • Deleting those 4 layers
  • Adjusting the opacity of the created sharpened layer
  • Merge down

Would anyone be interested in adding an option to forgo the separate layers and combining into a single layer, so it could be used in both ways?
I went to the website listed in the script, but it is no longer there.

First time i ever saw this particular EG filter. :)

Re: Script Mod Requests

Sat Feb 27, 2016 10:00 am

You know i can not export to SVG with GIMP-2.8.16. Couldn't we do that with GIMP-2.8.14?

Re: Script Mod Requests

Sat Feb 27, 2016 10:32 am

My two cents on path ...

Edit (17-03-206): newer version in the post (# 31)

Re: Script Mod Requests

Sat Feb 27, 2016 11:14 am

Rod wrote:You know i can not export to SVG with GIMP-2.8.16. Couldn't we do that with GIMP-2.8.14?
In the Gimp Path dialog context menu you can export an active path or all paths with an SVG extension. Inkscape will recognize the basic Gimp path coordinates (xml) but I would save(as) before editing, Inkscape then adds relevant workspace data to the SVG.

Re: Script Mod Requests

Sun Feb 28, 2016 9:15 am

Odinbc wrote:
Rod wrote:You know i can not export to SVG with GIMP-2.8.16. Couldn't we do that with GIMP-2.8.14?
In the Gimp Path dialog context menu you can export an active path or all paths with an SVG extension. Inkscape will recognize the basic Gimp path coordinates (xml) but I would save(as) before editing, Inkscape then adds relevant workspace data to the SVG.

Thanks Odin. Forgot about that menu link.

MareroQ i get this trace back error running the filter.
Image

Re: Script Mod Requests

Sun Feb 28, 2016 1:15 pm

Sorry for the late reply. For some reason I am not getting reply notifications anymore and need to investigate.
I thought this thread had died on the vine but luckily decided to look in on it anyway.

TYVM MareroQ!
This works perfectly for my needs.
I tried it and got errors similar to Rod, but checked the script and saw the default path was for windows and not linux.
After that the only trouble I had is if you don't select a save directory (the default None), I got the exact error as Rod.
Once I fixed the first two stumbling blocks I was golden!

This is works great for me, but it would be cool if you could hard code a default "temp" directory since it seems to require a valid path and None is not a valid choice.
This would be a great default choice if you don't intend to keep the svg and just wanted to edit the path in Inkscape and return to gimp.
(If you try with none and get the error, you can't then select a path again as the "OK" button is greyed out. You have to close the dialog and try again.)

Regardless. I can't thank you enough!!

Cheers

P.S. I checked all my notification setting and all looks well. Is anyone else not getting subscribed thread notifications?

Re: Script Mod Requests

Sun Feb 28, 2016 1:48 pm

Odinbc - add export active path
Rod - You have selected the directory before starting: "Select a directory to save filename.svg" ?
Akovia - add katalog C:/TEMP (for Linuksand so You have to change ... /home/TEMP or wherever You want)


Edit (17-03-206): newer version in the post (# 31)

Re: Script Mod Requests

Sun Feb 28, 2016 2:17 pm

Perfection! :bowdown

Re: Script Mod Requests

Sun Feb 28, 2016 2:41 pm

Hi,
Rod and MareroQ: the following post http://gimpchat.com/viewtopic.php?p=177842#p177842 seems to explain, at least for GIMP-2.8 on 'Windows', the problem Rod had.
Also a suggestion for version-0.2 line 54 at the end, replace ...''C:/TEMP'' by ...''/TEMP'' this will be more 'Linux' friendly while acceptable for 'Windows'. (But for 'Linux' you have to change also, the lines with the ..."\\"...)

Re: Script Mod Requests

Sun Feb 28, 2016 2:59 pm

MareroQ wrote:Odinbc - add export active path
Rod - You have selected the directory before starting: "Select a directory to save filename.svg" ?
Akovia - add katalog C:/TEMP (for Linuksand so You have to change ... /home/TEMP or wherever You want)

Version 2 works perfect MareroQ. Thanks!

Thank you too Rob. :)

Re: Script Mod Requests

Sun Feb 28, 2016 3:23 pm

Hi Robert.

Thanks for info.

In next weekend - try to apply to Your advice.

I plan to add also:
- point to the directory where Inkscape (select directory - not edit plugin);
- delete the filename.svg if it is open when you return to Gimp (choice: yes or no).

For me, it will look for solution - a You are the Master of the programming - so can You finish (or quite changed in order to optimize) this plugin for Akovia and for others (and me)?

Re: Script Mod Requests

Sun Feb 28, 2016 3:53 pm

rob_brz1 wrote:Also a suggestion for version-0.2 line 54 at the end, replace ...''C:/TEMP'' by ...''/TEMP'' this will be more 'Linux' friendly while acceptable for 'Windows'. (But for 'Linux' you have to change also, the lines with the ..."\\"...)


Just a heads up on setting /TEMP on linux.
When I set my temp dir on Arch Linux, I set it to /tmp, which is the default tmp folder. (was the same when I ran ubuntu and xubuntu as well.)
Problem is that the plugin failed with "Permission Denied", since that is a root folder. I'm sure I could change some permissions to make it work, but I don't think it will "work out of the box" using /tmp, or /TEMP. Especially since /TEMP doesn't already exist.

Anyway, I ended up setting my default home directory trash folder instead.
/home/akovia/.local/share/Trash/
So I doubt there would be an easy way to cover both OS's

If anything to make it easier for the uninitiated would be to have variables at the top of the script, but I doubt anyone using this would have too much trouble setting their paths.

Re: Script Mod Requests

Sun Feb 28, 2016 5:33 pm

MareroQ wrote:Odinbc - add export active path
Rod - You have selected the directory before starting: "Select a directory to save filename.svg" ?
Akovia - add katalog C:/TEMP (for Linuksand so You have to change ... /home/TEMP or wherever You want)

Flawless, nice work MareroQ. :bigthup
I am looking forward to any tweaks.

Re: Script Mod Requests

Sun Feb 28, 2016 7:38 pm

Hi,
MareroQ:
I am not a master of programming (not easy for me) but like to go my own way.
Your plan for this plug-in appears sensible to me so I encourage you to persevere.
'os.sep' is the sub-folder separator for both Linux (/) and Windows (\) in Python.

akovia:
My suggestion to 'MareroQ' was not base on existence of those folders in the respective OS
but to have the usage of 'PF_DIRNAME', with minimal change, for selecting the folder that you wish.
The suggestion 'os.getcwd()' is better for folders existence in both OS, but probably not your final choice.
After testing, it's right to replace the default by your choice (new default).
You adapted this to Arch Linux already so felicitation for this.
Have you shown your work to 'MareroQ'?
Post a reply