automatic PNG export

A forum dedicated to George scripting questions
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: automatic PNG export

Post by Mads Juul »

Lukas wrote: But I can't seem to check if there's an outpoint available, what am I doing wrong? Somehow this 'CMP(OutState, set)' doesn't do anything.
I just remebered tv_markIn and tv_markOut falsely returns a whitespace in end of state
so uou should CMP with "set " insead of "set"

Code: Select all

tv_markOut 
PARSE result frame type
tv_warn "#"type"#"
IF CMP(type,"set ")==1
tv_warn "Mark Out is Set"
ELSE
	tv_warn "Mark Out is Clear"
END
... It took me some time to figure out last :)
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: automatic PNG export

Post by Lukas »

madsjuul wrote:This means you cannot render out you project TIFF in another size than you camera.
I mean if you have a camera wich is 1024X576 you cannot render it out in 1920X1080
Would you like to do this?
-Mads
No, it's fine like this. I'll just make sure my camera is always set to 1920*1080 :)
madsjuul wrote:... It took me some time to figure out last :)
Thanks again!
  • 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

Re: automatic PNG export

Post by Mads Juul »

Glad I Can help :D
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: automatic PNG export

Post by Lukas »

I use this button to check if there's a proper clip name, in/out point and if the camera settings are like I need them (1920*1080 25fps) before I run your script.

I hope I can get it to run automatically on the server and have another script convert the sequence to high+low quality .mov files.

Code: Select all

tv_markIn
PARSE result frame type
IF CMP(type,"set ")
INPOINT = "OK"
ELSE
INPOINT = "NOT SET!"

END

tv_markOut
PARSE result frame type
IF CMP(type,"set ")
OUTPOINT = "OK"
ELSE
OUTPOINT = "NOT SET!"
END


// NAME START
tv_clipname
oldclipname = result
IF CMP(oldclipname, Untitled)
tv_ReqString "Please rename clip|Sc1_shot_01"
newclipname = result
IF CMP (newclipname, Cancel)
newclipname = oldclipname
END
tv_clipname ClipID newclipname
END
tv_clipname
CLIPNAME = result
// NAME END

// CAMERA START
tv_CameraInfo 
PARSE result CAMWIDTH CAMHEIGTH filedmode CAMFRAMERATE aspectratio blur
CAMSETTINGS = "WRONG!"
IF CMP(CAMWIDTH, 1920)
IF CMP(CAMHEIGTH, 1080)
IF CMP(CAMFRAMERATE, 25)
CAMSETTINGS = "OK"
END
END
END
// CAMERA END

// POPUP START
tv_warn '"'CLIPNAME'"' '\n' CAMWIDTH"*"CAMHEIGTH '('CAMFRAMERATE "FPS"')' '\n' '\n' "Camera is" CAMSETTINGS '\n' "In Point is" INPOINT '\n' "Out Point is" OUTPOINT
// POPUP END
not sure if this is usefull to anyone else, but I thought I'd post it just in case.
  • 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
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: automatic PNG export

Post by Lukas »

I can't seem to figure this out, so I'm back to this old thread :)

Is it possible to go up in the directory and then save in a different directory?
Because we usually have my workfiles in a 'Shots' folder and have my render files in a 'Renders' folder.

Example:

Export this file...

Data/Projects/Filmname/Shots/001_Intro/001_Intro_v007_L.tvp

(clipname = 001)

To here...

Data/Projects/Filmname/Renders/001/001_00001.tif
Data/Projects/Filmname/Renders/001/001_00002.tif
Data/Projects/Filmname/Renders/001/001_00003.tif
  • 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

Re: automatic PNG export

Post by Mads Juul »

Lukas wrote:
Is it possible to go up in the directory and then save in a different directory?
it is possible.

So you are asking to get a new savepath relative to where the current TVP project is saved?
I have put some of function online. Where I get the Parent directory from the current Project look here
http://wiki.tvpaint.fr/index.php?title= ... rent.28.29

Please notice if these function is going to work you need to include the basic and advanced George functions found here
http://wiki.tvpaint.fr/index.php?title= ... es_:_Basic
http://wiki.tvpaint.fr/index.php?title= ... :_Advanced
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: automatic PNG export

Post by Lukas »

Thanks Mads,

But how do I use a 'function'? I can't find any documentation about it. I'm reading some stuff about an 'include george file', but I really have no idea how to use it.

EDIT:
After looking at some of your old posts I'm using this:

Code: Select all

tv_GetProjectName
projectpath = result
tv_clipname
clipName = result

	projectpath = Replace(projectpath,'\','/')
	strlen = LEN(projectpath)
	last = LastPos(projectpath,"/")
	projectdir = LeftString(projectpath,last-1)
	last = LastPos(projectdir,"/")
	projectdir = LeftString(projectpath,last-1)
	last = LastPos(projectdir,"/")
	projectdir = LeftString(projectpath,last-1)
	projectname = RightString(projectpath,strlen-last)
	strlen = LEN(projectname)
	last = LastPos(projectname,".")
	IF CMP(last,"0")==1
		projectbase = projectname
	ELSE
		projectbase = LeftString(projectname,last-2)
	END
	saveDir = projectdir"/Renders/"clipName
Allthough I don't really understand everything I'm doing, at least it's working! ;) Thanks
  • 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

Re: automatic PNG export

Post by Mads Juul »

Lukas wrote: But how do I use a 'function'? I can't find any documentation about it. I'm reading some stuff about an 'include george file', but I really have no idea how to use it.
http://wiki.tvpaint.fr/index.php?title= ... Procedures

Lukas wrote: Allthough I don't really understand everything I'm doing, at least it's working! ;) Thanks
But since this code is working You must have included the Basic and advanced George Procedures
because for instance the function Replace(projectpath,'\','/')
is not working unless you have included it into your script
Am I right?
User avatar
Lukas
Posts: 526
Joined: 14 Jan 2011, 11:15
Contact:

Re: automatic PNG export

Post by Lukas »

Ah yes! I get it now :)

You are correct!
  • 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