It is currently Fri Jul 05, 2024 12:23 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Script Mod Requests
PostPosted: Mon Feb 29, 2016 1:58 am  (#21) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi All.

Robert - to me You are a master (eg. Arrowscreator.py or Workflow_setup.py - is an outstanding demonstration of what can be done in Python - and for me a model to further amateur science programming).

I have a request for You.
As for SVGpage 0.5 for Windows (currently for me beyond the knowledge of Python) - if this is to be done?
http://gimpchat.com/viewtopic.php?f=9&t=11778#p186024

Akovia - I renew the suggestion of Robert - can You share here for the Linux version?


Attachments:
Autotrace and SVGpage.png
Autotrace and SVGpage.png [ 82.17 KiB | Viewed 1898 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: Script Mod Requests
PostPosted: Mon Feb 29, 2016 4:21 am  (#22) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
In version 0.3 I added what I planned:

- Check Folder Inkscape;
- Delete file for Output directory.


PS. Temporarily (?) Without taking into account guidance of Robert (maybe sometime - this is for me difficult and requires more time .... )
PPS. As for the name of the path - does anyone know how to force Python to accept specific characters (letters) national?


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


Attachments:
Gimp to Inkscape V-0.3.7z [1.45 KiB]
Downloaded 73 times
New V-0.3.png
New V-0.3.png [ 36.41 KiB | Viewed 1891 times ]

_________________
Image

Slava
Ukraini!


Last edited by MareroQ on Thu Mar 17, 2016 1:53 am, edited 1 time in total.
Top
 Post subject: Re: Script Mod Requests
PostPosted: Mon Feb 29, 2016 7:38 am  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
rob_brz1 wrote:
Have you shown your work to 'MareroQ'?

MareroQ wrote:
Akovia - I renew the suggestion of Robert - can You share here for the Linux version?

I'm really not sure what you are asking. All I did was change the directory from C:/TEMP to
(PF_DIRNAME, "outputFolder", "Output directory to save:", "/home/akovia/.local/share/Trash/"),

As far as a better way than manually entering it, there is a trash specification for Linux if you can access the variable
$XDG_DATA_HOME/Trash

or maybe something with tempfile.mkstemp?
https://docs.python.org/2/library/tempfile.html

I really want to help but feel I'm missing something here.

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.


Top
 Post subject: Re: Script Mod Requests
PostPosted: Mon Feb 29, 2016 7:51 am  (#24) 
Offline
GimpChat Member
User avatar

Joined: Jan 15, 2013
Posts: 133
MareroQ wrote:
As for the name of the path - does anyone know how to force Python to accept specific characters (letters) national?


I would think it would be easiest to generate path names from the plugin and not rely on stripping out bad characters.
Path-1
Path-2 etc...

This would make the plugin bullet-proof and not have to rely on a scheme to remove invalid characters, which may produce duplicate names to worry about.

_________________
Gimp 2.8.16
Arch Linux - XFCE 4.12
Some of my work.


Top
 Post subject: Re: Script Mod Requests
PostPosted: Wed Mar 02, 2016 9:43 pm  (#25) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi MareroQ,
MareroQ wrote:
PPS. As for the name of the path - does anyone know how to force Python to accept specific characters (letters) national?

Since my locale is not pure ASCII characters I have this problem also, you already have the solution for the translation in version 0.3 (line 2: # -*- coding: utf-8 -*-) only thing missing is for Windows file system which don't use 'utf-8' (Linux do), usually I encode or decode with Python the name of file or folder. But ASCII filename or folder are no problem.

Also I am reporting a bug in your version 0.3, replace (PF_DIRNAME, "ink", ...), by something like
        (PF_FILENAME, "ink", "Inkscape filename:", "/"),


Top
 Post subject: Re: Script Mod Requests
PostPosted: Thu Mar 03, 2016 4:24 am  (#26) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Thanks Robert.

I looked at Your plugin autosave_a.py (# for Windows file system and # Internationalization) - works great.
I tried to decode and encode in my plugin - but probably something I'm doing wrong and it does not work.

PS. What are the chances of SVGpage-0.5.py for Windows?

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Script Mod Requests
PostPosted: Thu Mar 03, 2016 8:34 am  (#27) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi MareroQ,
We learn more by our mistakes than our success.
For your question about 'SVGpage': the answer depends of your interest (not mine) of having it balance against your time estimate to obtain.


Top
 Post subject: Re: Script Mod Requests
PostPosted: Sun Mar 06, 2016 7:09 pm  (#28) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Since it seems that MareroQ is willing to share the blame with me :) ; I have attached here my work, to date, on is plug-in.
Should work with Linux, exec. permission needed, Windows and have a beginning of translation. The folder and file-name are my default for Windows, to be change.
If interested and you have 'Inkscape', unzip this archive in your user plug-ins folder for GIMP.


Attachments:
File comment: Gimp to Inkscape V=0.3
Gimp_to_Inkscape.zip [3.81 KiB]
Downloaded 79 times
Top
 Post subject: Re: Script Mod Requests
PostPosted: Mon Mar 07, 2016 4:34 am  (#29) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi Robert.

You are excellent. :yes
I just had to abandon further work beyond my knowledge. :oops:

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Script Mod Requests
PostPosted: Mon Mar 07, 2016 9:38 am  (#30) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi,
MareroQ wrote:
...
I just had to abandon further work beyond my knowledge. :oops:

That was contrary to my goal when writing post (#28) since knowledge is extensible and you and 'akovia' earn it.
But there still can be bugs and more knowledge.
I'm no spring 'chick' so looking for replacement!

Take care, Robert


Top
 Post subject: Re: Script Mod Requests
PostPosted: Thu Mar 10, 2016 3:20 pm  (#31) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi,
In the attachment an armouring for input file-name and folder. Also the file-names and folders are from my Linux and Windows.
For the adventurous I have included in folder 'experimental' a version of 'gimpfu.py' that try to address one pet peeve that I, believe, share with MareroQ: the one 'shot' nature of 'gimpfu.py'. With it in your user plug-in folder you have to push the 'Cancel' button to terminate if no GIMP error happens. A push on the 'OK' button when in non-push state should produce another cycle.

You can open a '.pot' file with a text editor, it does not produce a '.mo' file essential for translation, but can be use for correcting the English or/and produce a '.po' file. For doing so use the 'msgstr' under 'msgid'.

Edit: The attachment is now the package version 0.4 of 'Gimp_to_Inkscape'. Contains at the root one file 'Gimp_to_Inkscape.py' and two folders: 'experimental' and 'locale' which have something for translation organize the same way as the previous package 0.3.
To have access to this plug-in after its installation, you right-click on a path (vectors) layer in the 'path dialog', near the end of the just open window you should see its handle: 'Connection to Inkscape &...'.
Since one of the first goal, to my understanding, it's to continue work on vectors initiated in GIMP by transferring it to Inkscape for further development and back.
Please report any bug, found in it, within this thread for a month (from now 2016/03/17).

Edit (2016/06/16) : 'render' should work now if the top layer is a group-layer. Made some other improvements, see the 'History' at the beginning if you open the plug-in, while I was looking at it.


Attachments:
File comment: Version 0.4.2
Gimp_to_Inkscape-0.4.2.zip [17.71 KiB]
Downloaded 99 times


Last edited by rob_brz1 on Sat Jun 18, 2016 12:32 pm, edited 6 times in total.
Top
 Post subject: Re: Script Mod Requests
PostPosted: Fri Mar 11, 2016 3:27 am  (#32) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Your new gimpfu.py is sensational in the idea :tyspin - very useful for recurring activities (but with modified parameters) - preview the effect in the window! :coolthup (Dream: a would add another option "undo" would not need to use the Ctrl + Z).
A small suggestion: if you add even a scroll bar (because now the dilemma - which gimpfu use)?

Topic: alt-drag and non-scrolling plugins
http://gimpchat.com/viewtopic.php?f=9&t=13714#p186121


Attachments:
Undo.png
Undo.png [ 37.74 KiB | Viewed 2316 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: Script Mod Requests
PostPosted: Fri Mar 11, 2016 2:06 pm  (#33) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi,
MareroQ: Thanks for trying this 'gimpfu.py'. Your idea of an 'undo' button (for the last cycle) seems a necessity for the preview aspect :cool .
Did you make a photo montage to have it on 'Gimp_to_Inkscape' UI?

To explain my purpose.
Changing the comportment of 'gimpfu.py' is disruptive, unlike changing the way the UI is displayed (arakne, jazzon), as a pygimp plug-in writer I like stability.
Should view this as concrete ideas for GIMP version 3.0, when the plug-in API should change; since it should be progress.


Top
 Post subject: Re: Script Mod Requests
PostPosted: Sat Mar 12, 2016 4:11 am  (#34) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi Robert

- For "Undo" is a dream (so photomontage);

- I added a new option: Open svg modified in Inkscape? (although it is possible that a better option would be to open svg as layer or as a choice open as a new image - but I tried again, unsuccessfully);

- For the translation - I use Poedit - but for me it is for Python plugins will not work for Windows (the only case I know of the possibility of translation is arakne-path-shape-creator8.py);

- Added Your gimpfu.py joined with jazzon scrollbar (experimental).


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


Attachments:
Open svg.png
Open svg.png [ 365.89 KiB | Viewed 2279 times ]
Gimp_to_Inkscap V-0.4 beta.zip [10.6 KiB]
Downloaded 93 times

_________________
Image

Slava
Ukraini!


Last edited by MareroQ on Thu Mar 17, 2016 1:55 am, edited 1 time in total.
Top
 Post subject: Re: Script Mod Requests
PostPosted: Sat Mar 12, 2016 10:53 pm  (#35) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi MareroQ,

- Was not sure.

- When you are satisfied with the additions, gives me a holler then.

- I use 'Poedit' too but for Linux, transfer the translation to Windows and it works!


Top
 Post subject: Re: Script Mod Requests
PostPosted: Sun Mar 13, 2016 1:25 am  (#36) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi Robert.

- On the translation: it's my fault :geek - I added Gimp_to_Inkscape.mo file to the directory ... / share / locale / ... instead of the home directory ... / plug-ins / locale ...
Now it works!

- The new option - open svg (as a new layer or as a new image), you can help in the code? (the last time - on SVGpage.py for Windows is not longer count - lack of interest by others - although I do not think they know what they are missing :ninja ).
Attached standalone plugin (open svg as layer.py) - but adapted (probably in error :oops: ) in Gimp_to_Inkscape does not work.

Regards


Attachments:
Translation PL.png
Translation PL.png [ 26.22 KiB | Viewed 2248 times ]
Open svg as layer.zip [839 Bytes]
Downloaded 90 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: Script Mod Requests
PostPosted: Sun Mar 13, 2016 8:14 pm  (#37) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi,

- Happy that your translation problem are over (I favour, like you realize, the 'user or /home' over the 'administrator or /' for two reasons: 1) less writing hassle, 2) less likely to be messed with during a GIMP update)

- I look at that and make it work, for open as a new render layer, in 'Gimp_to_Inkscape' with the help of your stand alone plug-in; but was not able to make it works in a more direct way. I have very little experience with SVG file in GIMP so it still in a rough state.

Edit: see the attachment for what I have done for now (2016/03/15) .
By.


Attachments:
File comment: Version 0.4
Gimp_to_Inkscape_V-0.4.zip [2.78 KiB]
Downloaded 109 times
Top
 Post subject: Re: Script Mod Requests
PostPosted: Tue Mar 15, 2016 12:20 pm  (#38) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi Robert.

This is what I wanted to (unsuccessfully) to achieve.

Now, as I look at Your code it seems simple and obvious - but I have not found a solution for many hours.

Thank You for Your help and code - again something I learned from You.

Now it is more than vectors - so I suggest you change the name in the menu:
of "Vectors to Inkscape & ..." on "Connection to Inkscape & ...
Robert - if You agree to such a change?

As for me, this is the final version.

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Script Mod Requests
PostPosted: Tue Mar 15, 2016 3:07 pm  (#39) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi akovia and MareroQ,

The name change make sense and initially it was your baby.

The rough state mentioned in my previous post was mainly cause by the rendered size proposed.
Not to be embarrassed, it took me a day :oops: to realize that 'run_mode=RUN_INTERACTIVE' argument made the 'file_svg_load()' function overlook the 'width=height=0' arguments in it!
It is only obvious after you realize.

In a couple of day this will be included in an edited package attachment to former post #31.

Note: you can have a kind of preview by raising one step in the 'undo history dialog'.

Hoping that is to your satisfaction, Robert.


Top
 Post subject: Re: Script Mod Requests
PostPosted: Wed Mar 23, 2016 8:26 pm  (#40) 
Offline
GimpChat Member

Joined: Jul 13, 2014
Posts: 109
Hi,

'Gimp_to_Inkscape' version 0.4 works OK with GIMP-2.9.3, which I have.
Was wondering if somebody has tried it on GIMP-2.6, which I don't have any-more?


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Looking for Script Coder to make Script of my VHS effect

2

No new posts Attachment(s) A liitle Start Help with a Script-Fu Script

3

No new posts Attachment(s) Cannot run test script-fu script via console

7

No new posts Attachment(s) Script-fu

6

No new posts Attachment(s) Script-fu Labwow

7



* Login  



Powered by phpBB3 © phpBB Group