It is currently 24 Feb 2018, 04:19

GIMP TutorialsHow to write Plug-in for GIMP in Python (Showcase | Slideshow)

GIMP Tutorials
No avatar
dfkettle
Forum Member
View: Showcase | Slideshow
Topic Posts: 3/18
Posts: 13
Joined: 13 Jan 2018, 20:17
Cash on hand: 241.77 GLP
Gender: Guy
Location: Toronto, ON, Canada
Website: http://www.cuartooscuro.ca
Operating System: Windows
GIMP Version: 2.8.22
x 1
Canada

Re: How to write Plug-in for GIMP in Python

Post#15 by dfkettle » 13 Jan 2018, 21:45


But it doesn't seem to work (at least as far as the fg and bg colours are concerned). I added the push/pop calls to one of my scripts (which changes the colours), and they weren't restored. I'm running Gimp 2.8.22 on Windows 7.
0 x




Registered members enjoy ads-free content
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 10/18
Posts: 2191
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,236.90 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1218
x 264
Contact:
Canada

Post#16 by tim » 13 Jan 2018, 21:47


Are you sure it works for me.
I usually call context push before my script change colors.
Then my script changes colors and do whatever, then call context pop at the very end and it's restored.
Only reason it wouldn't work is if script runs into errors halfway through or seomthing like that.
I am also on same version of GIMP and windows 7.
Can you attach your script so i can see what's possible cause of it not working?
0 x



aka Tin
Image gimplearn.net                                              

No avatar
dfkettle
Forum Member
View: Showcase | Slideshow
Topic Posts: 3/18
Posts: 13
Joined: 13 Jan 2018, 20:17
Cash on hand: 241.77 GLP
Gender: Guy
Location: Toronto, ON, Canada
Website: http://www.cuartooscuro.ca
Operating System: Windows
GIMP Version: 2.8.22
x 1
Canada

Post#17 by dfkettle » 13 Jan 2018, 22:01


Yeah, it's working now. I removed everything that wasn't relevant to create a simple example, and now it works. I'll have to go back and look at the original script to see where the problem is. Thanks.
1 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 10/18
Posts: 2191
Joined: 26 Sep 2016, 00:16
Cash on hand: 8,236.90 GLP
Bank: 53,924.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1218
x 264
Contact:
Canada

Post#18 by tim » 13 Jan 2018, 22:04


Glad to hear you got it working.
Welcome to GL forum!
0 x



aka Tin
Image gimplearn.net                                              

Post Reply

Last 20 Members Who Visited This Topic

dfkettle (27), User avatar RJKD (21), taylor21 (1), User avatar leopardo-40 (1), User avatar gnerd (3), User avatar tim (49), User avatar animicule (4), User avatar Pat625 (4)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Ella
2: Ella
3: tim
4: Ella
5: Tom
6: RJKD
7: gnerd

Who is online

Users browsing this forum: LucivaldoSP and 6 guests