Command line issue

A forum dedicated to George scripting questions
Post Reply
jeremyb
Posts: 31
Joined: 31 Jul 2020, 08:52

Command line issue

Post by jeremyb »

Hello,

I want to output an MP4 from tvpaint via the command line.

When I execute the george script via the command line, the script works, but generates a mp4 of some Kb.
it is not usable.
When I execute a part of this script via the custom panel (inside tvpaint) it works and I have a working MP4.

Here is m'y subprocess command line call with Python:

Code: Select all

    subprocess_publish_tvpp = (
                            f'{tvpaint_exec}'
                            f' "cmd=tv_loadproject {data.file.filepath}"'
                            f' "cmd=tv_WriteUserString VfxConfig ScenePath {data.file.filepath}"'
                            f' "cmd=tv_WriteUserString VfxConfig PlayblastPath {vfx_playblast_fullpath}"'
                            f' "cmd=tv_WriteUserString VfxConfig StartFrame {data.task.frame_in}"'
                            f' "cmd=tv_WriteUserString VfxConfig EndFrame {data.task.frame_out}"'
                            f' "script={tvpaint_grg_script}"'
                            f' "cmd=tv_Quit"'
                        )
    call(subprocess_publish_tvpp)
Here is my george script:

Code: Select all

tv_ReadUserString "VfxConfig" "PlayblastPath" ""
playblastPath = '"'result'"'

tv_ReadUserString "VfxConfig" "ScenePath" ""
ScenePath = '"'result'"'

tv_ReadUserString "VfxConfig" "StartFrame" ""
startFrame = result

tv_ReadUserString "VfxConfig" "EndFrame" ""
endFrame = result

tv_LockDisplay "Export Mov..."

tv_SaveMode
tv_SaveMode "Mode=1016"
tv_SaveMode
tv_ProjectSaveSequence playblastPath startFrame endFrame
tv_UnLockDisplay

here is george script inside tvpaint (WORKING)

Code: Select all

//globals
startFrame = 1000
endFrame = 1043
playblastPath = "A:\projects\episodes\proj_101\s0080\p0310\vfx\playblast\p0310.mp4"

exportMov()

FUNCTION exportMov()
    tv_LockDisplay "Export..."
    tv_SaveMode
    tv_SaveMode "Mode=1016"
    tv_SaveMode
    tv_ProjectSaveSequence playblastPath frameIn frameOut
    tv_UnLockDisplay
END

Is my execution syntax correct ?
WINDOWS 10 : 10.0.19044 Build 19044
TVPAINT : 11.5.3-64bit dec 3 2021
CPU : i9-9900
RAM : 64Go
CG: RTX 2080 SUPER 8go
jeremyb
Posts: 31
Joined: 31 Jul 2020, 08:52

Re: Command line issue

Post by jeremyb »

On windows command line sended must be : "cmd=tv_loadproject filepath"
On linux command line sended must be : cmd="tv_loadproject filepath"

Quotation marks are positioned differently, and this is specific to the platform. I think... because if you switch it doesn't work.

Is there anything else that needs to be notified in the Args? or a specific order ?
By the way, there is no '--h' or '--help' Args ?
WINDOWS 10 : 10.0.19044 Build 19044
TVPAINT : 11.5.3-64bit dec 3 2021
CPU : i9-9900
RAM : 64Go
CG: RTX 2080 SUPER 8go
User avatar
Thierry
Site Admin
Posts: 2744
Joined: 07 Jan 2013, 08:28

Re: Command line issue

Post by Thierry »

MP4 export isn't supported in George (as I have said in the other topic), so we can't guarantee that your method will work.
Is there anything else that needs to be notified in the Args? or a specific order ?
We have a short page on arguments that can be used while launching the software in command line in our Online Documentation: https://www.tvpaint.com/doc/tvp11/index ... -arguments
You can pass a script in the arguments.
By the way, there is no '--h' or '--help' Args ?
There isn't.
Si votre question a trouvé réponse, marquez votre sujet comme Résolu.
If your question has been answered, mark your topic as Solved.
Post Reply