Need a way to replace the sub-object ID1 of all selected objects with 1 material
Hey all!
I have multiple objects in a scene, each with their own materials. Within each of those materials are 2 sub-object materials (ID#1 for left, and ID#2 for right).
I am looking for a quick way to select specific objects and replace it with a new material to all of the ID#1's (which are currently all unique).
Right now, I am manually doing this in the Slate Material Editor by dragging each individual material into the view, then linking the new material to each sub-object material.
I would be extremely grateful for any help to automate, or speed up this process! Thanks in advance :)
Trumap
Comments
Anyone help please? *bump*
Anyone help please? *bump*
...
You can use this function
Function arguments are:
*sourcemat* - new material for replacement
*nodes* - selection of objects which sub-material (in your case #ID1)
need to be replaced with *sourcemat* material
*id* - is ID number
Now how to use it. Run the code above first in maxscriptListener or Editor.
Select all object which submaterial need to be changed.
Let's say your *sourcemat* is in 15 slot in Material editor.
In maxscript listener write and execute this line of code
replaceMtls meditMaterials[15] selection id:1
bga
Anyone help please? *bump*
Anyone help please? *bump*