Jump to content

apply random ids


dande
 Share

Recommended Posts

I have a multisub material with 20 textures. I want to randomly assign these materials to about 500 objects. Does anybody know of a script that will allow me to randomly apply material ids between 1 and 20 to these 500 objects.

Link to comment
Share on other sites

Hi

Select all objects and run this script. It will create a MaterialModifier on top of the stack with a random id between 1 and 20.

 

for i in selection do(
matMod= Materialmodifier()
matMod.materialID = random 1 20
addModifier i matMod
)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...