i am looking for a script where i can quickly assign a material to a selected object . i would make a shortcut for the script
- default vray material with 50% grey diffuse
- chrome vray material with black diffuse and 90% reflections.
what would be the basic for assigning a material?
fn assignMat asCopy:off = ( if selection.count > 0 do ( material = Arch___Design__mi name:“TestMat” diff_weight:.02 refl_weight:1 refr_weight:.9 \ refl_func_fresnel:on opts_1sided:on opts_propagate_alpha:on opts_refl_depth:10 opts_refr_depth:10 – “asCopy” argument in the function mean that you have choise to assigne material as instance or copy for o in selection do o.mat = if asCopy then (copy material) else material ) )