ScriptSpot

Forum topic · General Scripting

Object name to Material name

By polbolotsoro · 2023-07-21

Description

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

Hi

SimonBourgeois · 2025-06-10

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 · 2023-07-21


(
	for o in selection do o.material = (StandardMaterial name:o.name)
)

Omg. thank you so much

polbolotsoro · 2023-07-21

Thank you