How tu use material from a library ?

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

Comment viewing options

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

finally I have the solution

finally I have the solution :

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

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

Comment viewing options

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