Notifications
Clear all

[Closed] vray override material wont work more than once?

Hey guys,

I’m trying to apply a material in the vray global switches, but running into some problems.

I have this code –

 
 
on btn_render pressed do
 
(
holdmaxfile()
 
vr.options_overrideMtl_mtl = testmat
vr.options_overrideMtl_on = true
 
render()
fetchmaxfile quiet:on
)

which will work once, but when I press the button again, the override material wont work, and just renders black.

If I use the below instead it works fine, but obviously not what I want really –

 
 
on btn_render pressed do
 
(
holdmaxfile()
 
$*.material=testmat
 
render()
fetchmaxfile quiet:on
)

Anyone know why I’m having this problem?

Thanks, Dean

2 Replies

anyone have any ideas?

thanks, dean

Nevermind I kind of solved the problem