Material names to object names with "_SS" suffix

Guys,

could sombeone help me with quick little UI-less tool:
i have around 100 objects with different materials on them. Each material has proper name but object names are generic. I would like to select all objects and get all object names identical like material names, with "_SS" suffix.
So for example, if i have object that has material named "ground dry", after this script, corresponding object name would be "ground dry_SS". I need it in Max 2015 and objects could be parametric (box, sphere, etc), editable meshes or editable polys. No modifiers on them.

Thank you for your help !
Cheers

Comments

Comment viewing options

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

.

(
	for o in selection where (oMat = o.material) != undefined do
	(
		o.name = oMat.name + "_SS"
	)
)
igamaximus's picture

Perfect

Thank you Kostadin :)

Comment viewing options

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