automatically create Material with layer's name

Hi, I'm looking for a script which automatically create and assign a Material with the name of the layer.

I've looking for this script on this site and on google but never find it.
I found one which creates automatically new material but I'm too bad to update it.
If it already exist i'm sorry for this request. (maybe a link ?)

That's for exporting an FBX to Substance painter with nice material renamed correctly.
Sorry for my poor english... and thank a lot for your support!

Comments

Comment viewing options

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

Posible solucion

Seria mi solucion mas o menos parecida, con esos resultados...

Instala el pack soulburnscripts, en el script "nameManger UI" escoges objet name based on mat name. Asi los objetos toman el nombre del material.

Solo queda "crear los layers " para eso usa este script que no recuerdo donde lo consegui "createlayerfromobjetname" https://yadi.sk/d/2xnH4eSa0MFE9w solo seleccionas los objetos y creara los layers para cada material...

AttachmentSize
screenshot_-_20_01_2021__05_18_45_p__m.png 285.38 KB
id_ivan's picture

-

or
for o in selection do o.material = StandardMaterial name:o.name

Rivanoor Bren
https://rivanoor.info

dijiroro's picture

Solution

Hi myself !
I find this solution which works nice.

for i = 1 to selection.count do
(
newmat = StandardMaterial()

newmat.name = (selection[i].name)
selection[i].material = newmat

)

AttachmentSize
ajoutermtlrenomme.ms 146 bytes

Comment viewing options

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