GIMP Chat
http://gimpchat.com/

How to write python plugin preview?
http://gimpchat.com/viewtopic.php?f=9&t=9586
Page 2 of 2

Author:  MareroQ [ Sun Nov 26, 2023 11:01 am ]
Post subject:  Re: How to write python plugin preview?

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).

Attachments:
Gmic Vignette.jpg
Gmic Vignette.jpg [ 114.29 KiB | Viewed 5736 times ]
LP Vignette.jpg
LP Vignette.jpg [ 88.66 KiB | Viewed 5736 times ]

Author:  trandoductin [ Sun Nov 26, 2023 1:40 pm ]
Post subject:  Re: How to write python plugin preview?

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.

Author:  MareroQ [ Mon Nov 27, 2023 1:39 am ]
Post subject:  Re: How to write python plugin preview?

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

Attachments:
bevel.jpg
bevel.jpg [ 115.41 KiB | Viewed 5700 times ]

Author:  trandoductin [ Mon Nov 27, 2023 6:33 am ]
Post subject:  Re: How to write python plugin preview?

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

Author:  MareroQ [ Mon Nov 27, 2023 9:10 am ]
Post subject:  Re: How to write python plugin preview?

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.

Author:  MareroQ [ Wed Nov 29, 2023 1:50 pm ]
Post subject:  Re: How to write python plugin preview?

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.

Attachments:
File comment: Comparison of the result in Gmic and LP
Stencil LP.jpg
Stencil LP.jpg [ 297.25 KiB | Viewed 5609 times ]
File comment: Experimental plugin for further modification
G'MIC - Stencil Live Preview.zip [3.53 KiB]
Downloaded 58 times

Author:  trandoductin [ Thu Nov 30, 2023 7:15 am ]
Post subject:  Re: How to write python plugin preview?

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

Author:  MareroQ [ Wed Feb 21, 2024 11:27 am ]
Post subject:  Re: How to write python plugin preview?

@ 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

Attachments:
Demonstrate builtin plugin GUI widgets.jpg
Demonstrate builtin plugin GUI widgets.jpg [ 77.58 KiB | Viewed 4901 times ]
Test-Demo-Plugin-Gui.zip [2.41 KiB]
Downloaded 17 times

Author:  trandoductin [ Sat Feb 24, 2024 7:07 am ]
Post subject:  Re: How to write python plugin preview?

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.

Author:  MareroQ [ Sat Feb 24, 2024 7:38 am ]
Post subject:  Re: How to write python plugin preview?

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.

Page 2 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/