Start TVPaint with a python script and run a .grg script Topic is solved

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

Start TVPaint with a python script and run a .grg script

Post by Lukas »

What's the default folder for george scripts if you want to run a script from the command line?
edit: nevermind I found the folder.

How do I run the script on startup on mac and linux trough the command line?
  • 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
spyderheart
Posts: 124
Joined: 22 Jan 2013, 03:11

Re: Start TVPaint with a python script and run a .grg script

Post by spyderheart »

...half a decade later.

Have you had any success with this?
David
--------------------------------------------------------
TVPaint 11.7 Standard
System: 64GB RAM // 3 TB SSD // Core i7 8700K // NVIDIA GTX 1080// Windows 10 Home
User avatar
Clément
Posts: 93
Joined: 25 Jan 2017, 08:38

Re: Start TVPaint with a python script and run a .grg script

Post by Clément »

I posted an example of this on the technical support forum the other day:

Code: Select all

import os
from subprocess import call

#path to tvpaint executable
#tvpaint_path = '"C:\Tvpaint.exe"'
tvpaint_path = '"/Applications/TVPaint Animation 11 Pro.app"'

#cmd prefix
cmd_prefix = ''
cmd_suffix = ' '
os_usecall = True
print( os.name )
if os.name == 'posix':
    cmd_prefix = 'open -n -W -a '
    cmd_suffix = ' --args '
    os_usecall = False

baked_command = cmd_prefix + tvpaint_path + cmd_suffix + '"cmd=tv_runscript myscript.grg"'
print( baked_command )

if os_usecall:
    call( baked_command )
else:
    os.system( baked_command )
Clement Berthaud, Software Developer, TVPaint Team
Post Reply