export frame sequence with alpha. Topic is solved

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

export frame sequence with alpha.

Post by jeremyb »

Hi,

I try to adapt a linux script working on TVPaint 11.0.3 to TVpaint 11.5 on windows and i've got few issue.

Code: Select all


tv_Background "NONE"
tv_SaveMode "PNG" "b32"
tv_AlphaSaveMode NoPreMultiply

FUNCTION exportPNG()
    //init
    loop= 1
    i= 0
    WHILE loop
        tv_LayerGetID i
        currentLayerID = result
        IF CMP(currentLayerID,"NONE")==0
            tv_LayerSet currentLayerID
            tv_LayerInfo
            PARSE result layerDisplay a2 a3 layerName a5 imagePos imageEnd a7 a8 a9 dummy
            IF CMP(layerDisplay,"OFF")==0 && CMP(layerName,"playblast")==0
                lyrPath = exportLayerPath"\"layerName
                tv_WriteTextFile "mkdir" lyrPath
                FOR CurrImage = startFrame TO endFrame
                    tv_layerImage CurrImage
                    finalPath = lyrPath"\"episodeNum"_"sequenceNum"_"shotNum"-"layerName"_"CurrImage".png"
                    tv_LockDisplay "Exporting... (layer "layerName", image "CurrImage" )"
                    tv_saveimage finalPath
                    tv_UnLockDisplay
                END
            END
            i = i + 1
        ELSE
            loop=0
        END
    END
END
Loop, working good now. But Export won't work properly.
I'v got only blackframe ?
Somthing change in tv_SaveMode ?

regrads,
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: export frame sequence with alpha.

Post by jeremyb »

Some news !
My bad didn't check if anim layer was stretched, hold, loop...Finnaly if the anim layer was 'STRETCH' isn't work.

Code: Select all

tv_LayerStretch currentLayerID end frameCount stretch
BUT
if anim layer was in 'LAST' it work.

Code: Select all

tv_LayerStretch currentLayerID end frameCount last
Why ?
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
Post Reply