GIMP Chat
http://gimpchat.com/

x=x+1 for Text entry
http://gimpchat.com/viewtopic.php?f=8&t=19799
Page 1 of 1

Author:  CannibalCat [ Thu Jan 27, 2022 4:56 pm ]
Post subject:  x=x+1 for Text entry

GIMP Version: 2.8.14
Operating System: Windows
GIMP Experience: New User



OKay, I'm not even sure what I want is possible, so I'll explain what I'm doing.
I regularly create png tokens for Roll20, for example, I've made a token of an Orc, but since there are often dozens of orcs at one time, I've taken to numbering each token using the Text function, then exporting the numbered token as "Orc-01.png", then renumbering the text field an exporting as "Orc-02.png" and so on.

I'd like to know if there's a macro or other way I can get GIMP to auto-renumber the text field and export the new token as an incremental number (like x=1, while x<50, enter text in field as x, then export as name tokenName-x, then x=x+1 and repeat)

Is such a thing possible?

Attachments:
orcA-02.png
orcA-02.png [ 69.82 KiB | Viewed 606 times ]
orcA-01.png
orcA-01.png [ 69.09 KiB | Viewed 606 times ]

Author:  ofnuts [ Thu Jan 27, 2022 5:23 pm ]
Post subject:  Re: x=x+1 for Text entry

Not without writing a script for this....

Author:  CannibalCat [ Thu Jan 27, 2022 10:37 pm ]
Post subject:  Re: x=x+1 for Text entry

can it be done in javascript? If so, how/where would I plug it in?

Author:  ofnuts [ Fri Jan 28, 2022 2:45 am ]
Post subject:  Re: x=x+1 for Text entry

What has JavaScript to do with this? In Gimp you write scripts in Scheme/Script-fu or Python.

A completely different solution is to add the labels using an external utility such as ImageMagick.

Author:  CannibalCat [ Fri Jan 28, 2022 3:12 am ]
Post subject:  Re: x=x+1 for Text entry

python it is then. thanks.

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