ScriptSpot

Forum topic · General Scripting

How tu use material from a library ?

By blackdevil · 2017-08-18

Description

Hello

For my script I want to know how to call a material from a library ?

Because I know just how to assign a material from the compact material editor by this lign :

$.material = meditMaterials[8]

thanks

Comments (1)

blackdevil · 2017-08-21

finally I have the solution :

mat = loadTempMaterialLibrary "mylibrary.mat"
$.material = mat[i]

(i is the number of my material in my library)