Here's some comments. [COLOR="Green"]--NOTHING WRONG WITH THIS LINE, EXCEPT IN MAXSCRIPT IF YOU HAVE AN ELSE CLAUSE YOU NEED TO USE "THEN" NOT "DO"[/COLOR]for obj in selection do[COLOR="Green"]--THE BRACKET DOESN'T NEED TO BE DOUBLE UP[/color] (([COLOR="Green"] --YOU DON'T DECLARE VARIABLES IN MAXSCRIPT OR END LINES WITH A…
Instead of looping the scene materials, we can just collect all the materials of a class. In the following code you you need to replace standardmaterial with the class name of the VRay materials. You can get the class of a VRay material by applying it to an object and running this snip: classof $.material (
setProperty…
There are several errors in your script, but the logic is sound. This should help you out. ( --FUNCTION TO TEST AND UPDATE A PROPERTY fn SetColor mat prop col = ( if isProperty mat prop do ( setProperty mat prop col ) ) --FUNCTION TO CHANGE THE PROPERTY OR RECURSE fn ChangeMaterialColor mats col = ( for mat in mats do ( if…