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()