Change Vray material properties on selected objects
I have a question about a litttle script that changes several Vray material properties at once. The current script I'm using changes all materials in the scene and works fine, but it would be very helpful to have the same script work on selected objects. A former colleague helped me with the original script. I can't figure this out by myself. I find the script very helpful when setting up a Vray-scene and I just change, add or disable properties as needed.
Any help would be highly appreciated!:)
( fn doif mat= ( if classof mat==vraymtl then ( format "navn %\n" mat.name mat.option_traceReflection=true mat.reflection_glossiness=0.8 mat.reflection_fresnel=true mat.reflection=color 255 255 255 mat.reflection_subdivs = 16 mat.texmap_bump_multiplier = 5 mat.texmap_bump = VRayEdgesTex () mat.texmap_bump.widthType = 0 mat.texmap_bump.thickness = 0.1 ) ) for i in scenematerials do ( if classof i==multimaterial then ( for j in i.materialList do ( doif j ) ) else if classof i==vraymtl then ( doif i ) ) )
Thanks in advance!
Comments
Wow, thanks, this will be so
Wow, thanks, this will be so helpfull! Works like a charm!
...
As you see now you are not limited to multimaterial and default vrMat.
This work for any case. I mean nested vrMat.
Cheers!
bga
Genius, thank you!
Genius, thank you!
...
Try this
bga