ScriptSpot

Forum topic · Scripts Wanted

Material names to object names with "_SS" suffix

By igamaximus · 2020-05-18

Description

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 (2)

.

miauu · 2020-05-18


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

Perfect

igamaximus · 2020-05-18

Thank you Kostadin :)