It is currently Sat Jun 29, 2024 11:09 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: How to write python plugin preview?
PostPosted: Sun Nov 26, 2023 11:01 am  (#21) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
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 5727 times ]
LP Vignette.jpg
LP Vignette.jpg [ 88.66 KiB | Viewed 5727 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Sun Nov 26, 2023 1:40 pm  (#22) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3999
Location: Canada
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.

_________________
TinT


Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Mon Nov 27, 2023 1:39 am  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
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 5691 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Mon Nov 27, 2023 6:33 am  (#24) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3999
Location: Canada
I think it's exactly like reinventing the wheel. But it's fun.

_________________
TinT


Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Mon Nov 27, 2023 9:10 am  (#25) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
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.

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Wed Nov 29, 2023 1:50 pm  (#26) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
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 5600 times ]
File comment: Experimental plugin for further modification
G'MIC - Stencil Live Preview.zip [3.53 KiB]
Downloaded 58 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Thu Nov 30, 2023 7:15 am  (#27) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3999
Location: Canada
you're running with it... congrats, even the color change to match GIMP interface too :D

_________________
TinT


Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Wed Feb 21, 2024 11:27 am  (#28) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
@ 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 4892 times ]
Test-Demo-Plugin-Gui.zip [2.41 KiB]
Downloaded 17 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Sat Feb 24, 2024 7:07 am  (#29) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3999
Location: Canada
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.

_________________
TinT


Top
 Post subject: Re: How to write python plugin preview?
PostPosted: Sat Feb 24, 2024 7:38 am  (#30) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
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.

_________________
Image

Slava
Ukraini!


Top
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Convert GIMP plugin from Python 2 to Python 3

4

No new posts Attachment(s) Macbook User and Python plugin

14

No new posts Unable to get simple python plugin to show up

8

No new posts Get a mouse click or select a pixel in an image in a python plugin?

3

No new posts Please make a python plugin to combine my GEGL filters with GMIC

1



* Login  



Powered by phpBB3 © phpBB Group