for obj in selection do (( int $.i = $.material.materialList.count; if ($.i) do for mat in $.material.materialList do $.diffuse = color 255 255 255 $.ambient = color 255 255 255else ( $.diffuse = color 255 255 255 $.ambient = color 255 255 255 ) )) Absolute noob here with absolute noob question: Why is this not working?…
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…
Hi. Now the script for Vray ( there was another problem: mat 1 = multimaterial mat 2 = Vray2SidedMtl how to change the color in the material 3 ? I understand you don't work with Vray, but can you tell me the basis? I can't build
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…
Thanks for the help Till! I tried to debug it but I didnt know that then was a necessity. I think I glossed that over. Thanks again! :D Thanks again Juan! :D This has been super informative! I didn't know about the proper syntax of maxscript. I think I'll go read some more into it! From now on $ is for defining properties.…
Sorry, I don't use Vray. But you can change the property names in line 22 and 23 to the vray property names. To find the Vray property names you can probably select one object with a vray material and run this command: show $.material