Gimp 2.99: script-fu, gimp-file-load and GFile

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Gimp 2.99: script-fu, gimp-file-load and GFile

gmueller
Hello,

in version 2.10 I use in a script "gimp-file-load" with the arguments
"run-mode, filename, raw-filename" with the filename in STRING-format.
In the developer version the same procedure uses 2 arguments "run-mode,
file". The file has the format "GFile". The filename I get with the
SF-FILENAME parameter in the script-fu definition. The parameter "file"
in "gimp-file-load" does not accept a string parameter. How can I
convert the string of a filename in the GFile format?

Gottfried


_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Gimp 2.99: script-fu, gimp-file-load and GFile

Kevin Cozens-2
On 2020-10-14 8:07 a.m., Gottfried Müller wrote:
> In the developer version the same procedure uses 2 arguments "run-mode,
> file". The file has the format "GFile". The filename I get with the
> SF-FILENAME parameter in the script-fu definition. The parameter "file"
> in "gimp-file-load" does not accept a string parameter. How can I
> convert the string of a filename in the GFile format?

I haven't seen any discussion about the change to using GFile in the mailing
list messages. I don't know why that change was made or whether the side
effects of making the change where fully explored. It breaks just about all
of the third party plug-ins and scripts that need to do file I/O.

I don't know of any available API function that can take a filename and
generate a GFile object that would be needed by Scheme, Perl, Python, or
Ruby scripts. One will need to be made available or the API may need to be
changed to continue allowing the use of functions that can take a filename
as a string.

--
Cheers!

Kevin.

http://www.ve3syb.ca/               | "Nerds make the shiny things that
https://www.patreon.com/KevinCozens | distract the mouth-breathers, and
                                     | that's why we're powerful"
Owner of Elecraft K2 #2172          |
#include <disclaimer/favourite>     |             --Chris Hardwick
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Gimp 2.99: script-fu, gimp-file-load and GFile

Developers mailing list
In reply to this post by gmueller
I think issue #5402 is relevant, and includes a patch to ScriptFu code for
2.99.

A script still uses string filenames.  ScriptFu the interpreter sees that
the signature of a PDB procedure requires a GFile and marshalls the string
into a GFile.

But the patch has not been applied yet.  Kevin, are you a maintainer who
can review and apply the patch?
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list