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

Re: How to write python plugin preview?

Sun Nov 26, 2023 11:01 am

Tim
Thank you very much for your quick reply - I will try the new options.
The live view has a drawback - I don't know if it's my weak computer, but the sliders are difficult to move (I have to use the arrow keys on the keyboard to make precise settings).
I mastered the color picker to use with G'MIC (easier than I thought).

Re: How to write python plugin preview?

Sun Nov 26, 2023 1:40 pm

MareroQ,
Congratulations :D on mastering color picker, since you're actually working with something that uses it and not just dumping out single value like my example hehe.

Re: How to write python plugin preview?

Mon Nov 27, 2023 1:39 am

Just a thought and a doubt – isn't it like reinventing the wheel?
I started looking at the preview filters I know and I like their solutions (e.g. bevel2_3.py from 2008).
I need to think about this before I continue fun with gtk.
Or maybe there will be a better solution:
viewtopic.php?f=9&t=20652

Re: How to write python plugin preview?

Mon Nov 27, 2023 6:33 am

I think it's exactly like reinventing the wheel. But it's fun.

Re: How to write python plugin preview?

Mon Nov 27, 2023 9:10 am

However, there is a big difference between "Live Preview" plugins and existing plugins (LayerFX, high-end-sharpen, bevel, and even spyro_plus...).
When you change the value of parameters in Live Preview, the result will be shown (rendered) in real time (that's why the sliders may get stuck), unlike others where parameters can only be set with the preview turned off.
It is probably as you wrote that Live Preview works best in the case of simple and fast plug-ins (procedures), and in the case of slow (extensive) plug-ins - with the preview activated after setting the parameters.

Re: How to write python plugin preview?

Wed Nov 29, 2023 1:50 pm

Some fun with 'Live Preview' - I added 3 options:
1. Cancel.
2. Preview (can be turned off for easier parameter adjustment).
3. Gimp theme support.

Re: How to write python plugin preview?

Thu Nov 30, 2023 7:15 am

you're running with it... congrats, even the color change to match GIMP interface too :D

Re: How to write python plugin preview?

Wed Feb 21, 2024 11:27 am

@ Hi Tin Tran,

Only if you have the time and inclination:
Two requests (to be checked in GPT chat);
1. Example of creating bookmarks and gtk.CheckButton
2. How the Test-Demo-Plugin-Gui.py plugin will change in gtk2

Re: How to write python plugin preview?

Sat Feb 24, 2024 7:07 am

Hi,
I am not aware of bookmarks and not sure how they relate to user inputs.
How gtk2 will change is dependent upon gtk2. I would consult chatGPT it when I update GIMP and when GIMP uses it.
Right now, I don't know because my GIMP doesn't use it and so I can't really test it even if chatGPT showed me syntax for gtk2.

Re: How to write python plugin preview?

Sat Feb 24, 2024 7:38 am

Hi Tim,

Thank you for your response.
My problem is that most of the procedures from Test-Demo-Plugin-Gui can be displayed in the plugin with gtk2 - for some unknown reason they don't work.
So those mastered in action will have to suffice, but it's a bit of a pity.
Post a reply