MaxScript CoronaMaterial Falloff and IOR

MaxScript CoronaMaterial Falloff and IOR

cfGVREN
Explorer Explorer
2,343 Views
5 Replies
Message 1 of 6

MaxScript CoronaMaterial Falloff and IOR

cfGVREN
Explorer
Explorer

Hi all,

 

i need a MaxScript, which searches all used coronaMtl, changes ReflectIOR to 1.52 and all Falloff Maps Type to Perpendicular/Parallel.

 

This is what i have so far:

 

coronaMats = getClassInstances CoronaMtl
 for mat in coronaMats do
 (
	mat.fresnelIor = 1.52
	mat.texmapReflect.type = 1

 )

 

It works vor the IOR, but if after the Reflect Falloff map is something else (like CollerCorrection) i get an error...

what can i do/add?

 

Thank you!

0 Likes
Accepted solutions (1)
2,344 Views
5 Replies
Replies (5)
Message 2 of 6

cfGVREN
Explorer
Explorer

Does anyone have an idea? 🙂

0 Likes
Message 3 of 6

Swordslayer
Advisor
Advisor
0 Likes
Message 4 of 6

cfGVREN
Explorer
Explorer

Doesnt seam to be the Solution 😞

 

There is no error message, if i use your code, but it is not changing the falloff map type...

I guess this time it is, because of the ColorMap at the end?

 

Here is an Image of my TestMaterial

 

MaterialTest.PNG

0 Likes
Message 5 of 6

Swordslayer
Advisor
Advisor
Accepted solution

Oh, so you want to change it anywhere in the mat hierarchy? You can always do it like this:

 

(getClassInstances Falloff target:mat).type = 1
-- or (getClassInstances Falloff target:mat.texmapReflect).type = 1 if you want to limit it to that one slot
0 Likes
Message 6 of 6

cfGVREN
Explorer
Explorer

Thats it! Thank you so much!

0 Likes