Why is it so hard to create a plugin. I am trying to write a simple plugin to export the current image to a PNG file and then close the view. I am stuck at the save the image. Plugin attached.
Thread Rating:
|
Writing a simple python plugin
|
|
10 hours ago
Can't see your plug-in
(10 hours ago)MrsP-from-C Wrote: Can't see your plug-in scripts/plugins can now be attached with extension, for a .py maybe your browser is security blocking the attachment. However it is a subject close to my heart, Gimp 3 python is complicated for the average user and any explanations are welcome. To me the attachment looks AI generated. (I have my own script-fu (as a plugin) for exporting webp and it is a quarter the size. ) I will attach the plugin zipped in-case of a security block and in its own folder as required by Gimp 3. Fails on the first line, the shebang is incorrect. Fix that and it does register but there are hard coded paths (specific to user) Attached:
exportandclose.zip (Size: 1.8 KB / Downloads: 5)
Thanks6 for the upload- it should have had the extension. Yes it is ai generated - Google does well most of the time when writing python script but has fallen completely flat on gimp plugins(He likes to think gimp2 is still a thing). Documentation seem very sparse for this. Yes the paths are hardcoded - easier than figure out what gimp can or can't do when it took hours for me to figure out how to get it to even show up. I'm trying to fixup a lot of images and the export process is so long - complicated by something has taken hold of the keyboard shortcut for export. I finally changed it. Then it comes up with a name dialog where I sometimes have to change from jpg to PNG then another dialog comes up with no buttons (weird) and I have to move this dialog slightly and the final parameter dialog comes up. Tedious.
Hi,
I went through code and made a working version. I believe there's no way to close the image with Python after saving it as a PNG. Code: #!/usr/bin/env python3
Well I got past the save file. but the close image is not working. appending fixed program
|
|
« Next Oldest | Next Newest »
|


