Notifications
Clear all

[Closed] caling mrshadowmap

Hi guys, how can declare in maxscript that instead of activate by default the shadowmap when i create a light with a script, have by default the mrshadow map?

2 Replies

Should be something like this:

theLight.shadowGenerator = mental_ray_Shadow_Map()

Greets.

If you want lights to use the mental ray shadow map by default on creation, put this script in your 3dsMax8\Scripts\Startup directory.

fn setMRShadows =
	(
	local obj = callbacks.notificationParam()
	if superclassof obj == light AND isproperty obj #shadowGenerator then
		(
		obj.shadowGenerator = mental_ray_Shadow_Map()
		)
	)


callbacks.addScript #nodeCreated "setMRShadows()" id:#mrShadows
--callbacks.removeScripts id:#mrShadows

Cheers,
Dave