Page 1 of 1

RenderMap Sequence Script

Posted: 02 Jul 2011, 15:19
by Leo
Hi Guys.
A couple of days ago I had to render a sequence of a RenderMap, which as far as I know isn't a built-in feature. So I wrote this little script to automate the process and save me about 10000 clicks and keystrokes ;).
It's adequately annotated and should be self-explanatory.
Enjoy.

The Python script:

Code: Select all

#----------------------User Parameters-------------------
ObjectName = "MyMesh" #Enter the name of the Object on which the Rendermap resides here.
RenderMapName = "RenderMap" #Enter the name of the Rendermap you wanna render a sequence of here.
#Designate your framerange here
StartFrame = 0
EndFrame = 100
FolderLocation = "D:\\MyProjectLocation\\MyProject\\Render_Pictures\\RenderMapRenderFolder"
Filetype = ".png" #Enter . + the filetype you selected in the RenderMap's settings e.g. ".png" or ".tif"
#----------------------User Parameters-------------------

app = Application

app.SetValue("PlayControl.Current", StartFrame, "")
i = int(app.GetValue( "PlayControl.Current" ))
while i < EndFrame:
	i = int(app.GetValue( "PlayControl.Current" ))
	app.LogMessage("Rendering frame: " + str(i))
	Filepath = FolderLocation + "\\" + ObjectName + "_" + RenderMapName + "_" + str(i) + Filetype
	app.LogMessage(Filepath)
	app.SetValue(ObjectName + "." + RenderMapName + ".imagefilepath", Filepath, "")
	app.RegenerateMaps(ObjectName + "." + RenderMapName, "")
	app.NextFrame()

Re: RenderMap Sequence Script

Posted: 03 Jul 2011, 01:55
by rray
Hey cheers for the useful script.

Re: RenderMap Sequence Script

Posted: 28 Dec 2012, 21:17
by Kerro Perro
Some days it's easy: i wondered if i could rendermap a sequence, googled it and found this. B-)
Great script, does exactly what i want, thanks Leo!

Re: RenderMap Sequence Script

Posted: 21 Jan 2013, 12:31
by SamHowell
Thankyou Leo. Just what I need.

Re: RenderMap Sequence Script

Posted: 02 Jun 2015, 22:36
by izze
Works Great. Saved me a lot of time today. Thanks.

Re: RenderMap Sequence Script

Posted: 10 Jun 2015, 00:42
by Bullit
Thanks for bumps up on this.