Everything related to SDK.
User avatar
By Brany
With just one MXS scene and a sequence of HDRIs is really easy to create a MXS sequence using pyton/c++ sdk.
Python example:
Code: Select all
import pymaxwell as mw
import os

hdrifolder = 'c:/hdri/timelapse'
mxspath = 'c:/scenes/myscene.mxs'
outputfolder = 'c:/scenes/output'

if not os.path.exists(outputfolder):

hdris = mw.getFilesFromPath(hdrifolder,'exr')

mxs = mw.Cmaxwell()
index = 0

if mxs.readMXS(mxspath):
	for hdri in hdris:
		hdripath = os.path.join(hdirfolder,hdri)
		for ibltype in ibltypelist:
			bitmap,st,sm,interp,intensity,ut,vt,uto,vto,ok = mxs.getEnvironment().getEnvironmentLayer(ibltype)
			if not ok:
				print('Error getting IBL')
			ok = mxs.getEnvironment().setEnvironmentLayer(ibltype,hdripath,st,sm,interp,intensity,ut,vt,uto,vto)
			if not ok:
				print('Error setting IBL')
		outpath = os.path.join(outputfolder,'timelapse_{0:0>4d}'.format(index))
		if not mxs.writeMXS(outpath):
			print('Error writting '+outpath)
		index = index + 1
Last edited by Brany on Mon Jun 29, 2015 10:29 am, edited 1 time in total.
User avatar
By greengreen
Thanks Brany, this is great. I'll have to spend some time this weekend to see if I can get it to work, I haven't done scripting in Maxwell yet.
I'll post back
User avatar
By greengreen
I tried exporting a quick 5 frame test with the .exr file, although maybe I should have only animated the sun and not the environment. I would hope the .exr would timelapse with it's own intelligence somehow?


It seemed like it didn't read my path correctly on my external drive


So I changed it, but I don't think I know what to do now

User avatar
By Brany
No, you can't expect that IBL EXRs updates magically in each frame ;). What you see in the parameters' panel is what you get.

You should use slash (/) instead of backslash (\) to set the paths. Another option is to use double backslash (\\).

Please check out tabulation on lines 29-30-31 in your code, I made a mistake in the code I posted (I've just fixed it, see my 1st post edited).
New podcast - CG Talks

Hi guys! We've just finished the first season of […]

Thanks, Luis, appreciated. It looks like industria[…]

That looks like a low bpc (bits per channel) norma[…]

Fully working plugin for C4D

When you will be working on it please try to keep […]