RenderMap Sequence Script

Plugins linking to this thread: (hide)

RenderMap Sequence ScriptAuthor: Leo
A load-edit-run type script that renders a sequence of rendermaps.

local backup: RendermapAutomizer.zip

Leo
Posts: 128
Joined: 04 Jun 2009, 17:06

RenderMap Sequence Script

Post by Leo » 02 Jul 2011, 15:19

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()
You do not have the required permissions to view the files attached to this post.

User avatar
rray
Moderator
Posts: 1552
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany

Re: RenderMap Sequence Script

Post by rray » 03 Jul 2011, 01:55

Hey cheers for the useful script.
"as a maya discussion grows longer, the probability of a suggestion involving deleting the preferences approaches one"

softimage resources section (formerly known as rray.de/xsi) updated May 30 2018

User avatar
Kerro Perro
Posts: 306
Joined: 20 Mar 2011, 01:01
Location: Leiden, the Netherlands

Re: RenderMap Sequence Script

Post by Kerro Perro » 28 Dec 2012, 21:17

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!

User avatar
SamHowell
Posts: 364
Joined: 09 Jun 2009, 14:09
Location: Birmingham

Re: RenderMap Sequence Script

Post by SamHowell » 21 Jan 2013, 12:31

Thankyou Leo. Just what I need.

izze
Posts: 176
Joined: 24 Sep 2009, 20:02

Re: RenderMap Sequence Script

Post by izze » 02 Jun 2015, 22:36

Works Great. Saved me a lot of time today. Thanks.

Bullit
Moderator
Posts: 2404
Joined: 24 May 2012, 09:44

Re: RenderMap Sequence Script

Post by Bullit » 10 Jun 2015, 00:42

Thanks for bumps up on this.