It is currently 16 Dec 2017, 00:55

GIMP Python Fu ScriptsHow to access global parasites (get and set parasites) Python Fu (Showcase | Slideshow)

Share your Python Fu scripts for GIMP here
Post Reply
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 1/1
Posts: 2000
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,288.73 GLP
Bank: 41,331.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 1005
x 217
Contact:
Canada

How to access global parasites (get and set parasites) Python Fu

Post#1 by tim » 05 Apr 2017, 21:21


To set global parasites (for example "gimp-comment")

Code: Select all

	comments = "Some test string"
	parasite = gimp.Parasite("gimp-comment",0,comments)
	gimp.parasite_attach(parasite)
To get global parasite

Code: Select all

	comment = gimp.parasite_find("gimp-comment")
	pdb.gimp_message(str(comment))
ofnuts mentioned this (set flag to 1 in order for parasite to be persistent, so it's not lost when saving .xcf).

Code: Select all

	comments = "Some test string"
	parasite = gimp.Parasite("gimp-comment",1,comments)
	gimp.parasite_attach(parasite)
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
Post Reply

Last 20 Members Who Visited This Topic

User avatar Pat625 (1), User avatar gnerd (1), User avatar Steve Reid (1)

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

Who is online

Users browsing this forum: No registered users and 1 guest