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
Location: Viborg,Denmark
Contact:

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
Mads Juul
Storyboard Artist
blog: http://mjstoryboard.blogspot.dk/
Mail: mjstoryboard@gmail .com

Windows 10, 64 bit i7-4790 CPU 4.00 Hz,32 GB RAM, With TVP Animation 11 Pro (11.0.2-64bits)
2 Monitors 1920X1080 pixels + 1 Wacom Cintiq 21UX 2
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