[Closed] Object list and apply material
Hi guys I’m try to make a script. This will help in materialing a lot of geometry and making sure they have the right material.
First I need it to select all objects and list them. Next I would manually type in there material names. Then the script would run again assigning a standard material to the objects but with the name of the material assigned the materila in the editor. If another object has the same material only one would be made, make sure that there are no material dublicate and all objects have a material. Then all I would do is change the standard material to be the right colour and look right.
Hope this makes sence. Can any one help?
Cheers
James
Can anyone help at all. Select and list all objects then assign materials by corrisponding list.
Help please
James
Hi James,
I don’t have time to do the complete script but here is a start :
[color=white]–Select all nodes
[/color]max select all
–get them in an array
objectsarray = $
–traverse our array
for obj in objectsarray do
(
–Get all materials from nodes
mat = obj.material
if (mat != undefined)then
print mat.name
)
Sorry for the text formatting… It’s a copy/paste from Maxscript editor…
Regards,
James,
You’re welcome !
Feel free to tell us if you are stuck into Maxscript problems :wip:
Regards,