Object name to Material name

Hi, I need help creating a script. I want the script to create a Standard Legacy Scanline Material for the objects selected in the scene. The material names should match the object names, including objects that have multiple material IDs/names.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Tokamak's picture

Thank you Kostadin!

There's a script that could rename materials by object name, but it's too old and displays an error when multiple objects are selected. :(
https://www.scriptspot.com/3ds-max/scripts/quick-naming

AttachmentSize
qn_error.jpg 44.96 KB
SimonBourgeois's picture

Hi

If you need to rename existing material, you can use this :

for o in selection where o.material != undefined do o.material.name = o.name
miauu's picture

.

(
	for o in selection do o.material = (StandardMaterial name:o.name)
)
polbolotsoro's picture

Omg. thank you so much

Thank you

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.