Run a GRG script on multiple files

A forum dedicated to George scripting questions
Post Reply
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Run a GRG script on multiple files

Post by Lukas »

Is there a way to have a directory with multiple .TVPP files, and have TVPaint run a .GRG script on all of them?

Kind of like this...:

START TVPaint
Open file 1.TVPP
Run script X.GRG
Close file 1.TVPP
Open file 2.TVPP
Run script X.GRG
Close file 2.TVPP
Open file 3.TVPP
Run script X.GRG
Close file 3.TVPP
Open file 4.TVPP
Run script X.GRG
Close file 4.TVPP etc.
QUIT TVPaint
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Run a GRG script on multiple files

Post by Mads Juul »

one way is to read a folder with
tv_readTextFile
http://wiki.tvpaint.fr/index.php?title=Tv_ReadTextFile
If you find a TVPP file in this folder you can open it with tv_loadProject
http://wiki.tvpaint.fr/index.php?title=Tv_LoadProject
run the George script with
tv_runScript
http://wiki.tvpaint.fr/index.php?title=Tv_runscript
save and close the tvpp project with
Tv_SaveProject
http://wiki.tvpaint.fr/index.php?title=Tv_SaveProject
tv_projectClose
http://wiki.tvpaint.fr/index.php?title=Tv_ProjectClose
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: Run a GRG script on multiple files

Post by Lukas »

Thanks! Hopefully I can make this work :)
  • Lukas Sketch Panel
  • TVPaint Pro 11.7.3
  • MacBook Pro 2018 macOS Ventura 13.4.1 + PC Windows 10
  • Wacom Cintiq 27QHD + Wacom Intuos4
  • YouTube.com/@ClubBaboo
  • YouTube.com/@FrameOrder
Post Reply