Auto prepare files for export script (Help!)

A forum dedicated to George scripting questions
Post Reply
jonasjuhl
Posts: 1
Joined: 10 Jun 2020, 11:35

Auto prepare files for export script (Help!)

Post by jonasjuhl »

Hi everyone,
I am trying to make a script that I can attach to a button in TVPaint. It should follow these steps, but I am very new with George Script:
This is what I want it to do in pseudo code:

Foreach Layer:
create empty images from in point to first animation image
mark all images in layer
if last image.index < out point
add x empty instances where x is:
(out point - lastFrame.index)
exposure break (make everything on 1s)

This prepares my export for compositing, as they would like .png sequences on 1s, even with empty frames.

In the opened tvpaint file location, create a folder called: {name of tvpaint file} + "_export"
I will then use the json exporter to the new folder for .png sequences with the following settings:

Visible Layers: true
Folder Name Pattern: "%ln"
File Name Pattern: "%ln_%3ii"
Format: "PNG"
Mode: "RGBA"
Alpha: "No PreMult."
Compression (lossless): 5
Background: false
Ignore Duplicate Images: false

Is this a difficult task and an advanced script to do?

Best Jonas
User avatar
Hironori Takagi
Posts: 313
Joined: 14 May 2018, 10:15
Location: Tokyo, Japan
Contact:

Re: Auto prepare files for export script (Help!)

Post by Hironori Takagi »

When I wrote a script to automate json-export,
I asked the development staff if I could set advanced settings for PNG compression,
and the answer was "NO".
Other settings are described below.
https://www.tvpaint.com/doc/tvp11/index ... ds&lang=en
tv_clipsavestructure iPath "JSON"

I don't have much time right now, so I will answer if you can point out any unclear points in the individual content.
TVPaint 11.7.2(Nov 14 2023), Windows11 Pro, HP Spectre x360 Convertible 14-ea0xxx / TVPaint 11.7.1(Dec 22 2022) Mac OS 11.6, Apple MacBookPro M1 2020
User avatar
Thierry
Site Admin
Posts: 2780
Joined: 07 Jan 2013, 08:28

Re: Auto prepare files for export script (Help!)

Post by Thierry »

Here are the available options for the png export in George:
png-george-export.PNG
As M. Takagi said, it's not possible to use all advanced settings in George (like compression, PreMult or no PreMult)

I also advise you to use tv_SaveMode before calling tv_ClipSaveStructure in your script :)
Post Reply