SCRIPT TYPE: MacroScript (mcr) LANGUAGE: MaxScriptDESCRIPTION: This is a basic script that randomizes material IDs for editable mesh objects (TriMeshes) of a selection. Note that all objects in the selection must be 'Editable Meshes' for this script to work on all of them! Although this tool is simple and 'random' it could be useful sometime. DETAILS: Takes the current selection, and selects all of the first object's triangles. Then, randomizes the material ID from the number tolerances specified by the user. Then, the script loops through all objects in the selection, selecting all triangles of each mesh, and randomizing all IDs to a random value. Practical example: Need to change all IDs of 50 objects to the same value, such as 5? Change the settings 'ID:5 to ID:5', then select all objects, and hit randomize. Since the tolerance is 5 to 5, all objects will receive the value 5 to all IDs! Feel free to expand on this script as it's a starting point! INSTALLATION: Open the file by going to the MaxScript menu, and select 'Open...' Next, depending on the editor that opens the script, execute the command 'Evaluate All'. If in 3ds Max 2008+, use the 'Tools' menu to select 'Evaluate All' in the MaxScript ProEditor. Once evaluated, the script will be stored in the category 'Custom Scripts' in the 'Customize User Interface' dialog. Select the script from the 'Custom Scripts' category, and drag it to a toolbar, menu, quad, etc. |