Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Snippets for GIMP 3
#1
Hi all,

I’m familiar with Script-Fu, but I know nothing about Python scripting. (GIMP 3)
I’m testing a macro system and would really appreciate some small, self-contained Python snippets that can run with a button press, just something minimal to confirm it's working.

Any suggestions or examples would be cool.

Thanks!
Reply
#2
"small", forget it, there is a lot of boiler-plate even for the simple stuff. I made up my own library to minimize it.
Reply
#3
Even Ofnuts minimal is very verbose.

You could try this as a starter, the smallest I found. https://discuss.pixls.us/t/open-file-as-...-3/49370/7 and for those wondering looks like this: https://i.imgur.com/JQJ8uNR.mp4

Some sort of "macro" system would be more than welcome for dummies like me. There is batcher which will load procedures but the UI is clumsy (and lots of menu entries) Just want something linear where I can slot procedure in a list Wink
Reply
#4
(Yesterday, 02:59 PM)rich2005 Wrote: Even Ofnuts minimal is very verbose.

You could try this as a starter, the smallest I found.  https://discuss.pixls.us/t/open-file-as-...-3/49370/7  and for those wondering looks like this: https://i.imgur.com/JQJ8uNR.mp4

Some sort of "macro" system would be more than welcome for dummies like me.  There is batcher which will load procedures but  the UI is clumsy (and lots of menu entries)  Just want something linear where I can slot procedure in a list Wink


No snippets! what kind of scripting shop is this? Wink

I've got a Hello World working in Python:


Code:
import gi; gi.require_version('Gimp', '3.0');
from gi.repository import Gimp;
Gimp.message('Hello World from Python!')

it's a bit boring though. The macro should be able to do anything you can do in the python console, that's what I'm testing. Call plugins, multi-line snippets, nothing like that?

(Yesterday, 02:28 PM)Ofnuts Wrote: "small", forget it, there is a lot of boiler-plate even for the simple stuff. I made up my own library to minimize it.

snap for Script-Fu
Reply
#5
Hi,

If you are interested, it's available for testing in the Artbox Appimage.  

https://script-fu.github.io/artbox/hub/f...-Dockable/
Reply


Forum Jump: