Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography



Maxunderground news unavailable

Naming materials based on object name?
show user profile  Error404
Any way to do this? I have a bunch of objects (lots) and a bunch of materials, objects have acceptable naming, materials don't. I'd like to copy the object name to the material, if multiple objects have the same material, I don't care which object the material is named after.

Any way to do this? I searched around on script spot and didn't find anything.

www.DanielBuck.net - www.DNSFail.com

read 202 times
6/16/2016 5:50:10 AM (last edit: 6/16/2016 5:50:50 AM)
show user profile  Garp
The simplest I can think of:
for obj in selection where (mtl = obj.material) != undefined do mtl.name = obj.name




read 198 times
6/16/2016 6:17:35 AM (last edit: 6/16/2016 6:20:05 AM)
show user profile  Error404
Thanks Garp! I actually just found a script that is almost the same to what you have there.

I really should get more into scripting. I used to do minor scripting, but I haven't done scripting at all in 10 years, hah! Maybe time to get into it again :)

www.DanielBuck.net - www.DNSFail.com

read 193 times
6/16/2016 6:39:29 AM (last edit: 6/16/2016 6:39:29 AM)
show user profile  Garp
For the simple one-liners that are useful everywhere, it shouldn't take you long to get back to speed.




read 176 times
6/16/2016 12:20:35 PM (last edit: 6/16/2016 12:20:35 PM)
show user profile  Error404
yea, it's the simpler smaller scripts that get the most use :)

www.DanielBuck.net - www.DNSFail.com

read 164 times
6/17/2016 4:54:20 AM (last edit: 6/17/2016 4:54:20 AM)
#Maxforums IRC
Open chat window


Support Maxforums.org