GENERATE/PREV.gifGENERATE/NEXT.gif

MaterialLibrary : Collection :Mappable

A material library contains a table of materials. When you access the currentMaterialLibrary system global, it gives you back on of these objects. You can use the standard array indexing accessors to get and set materials in the library. Materiallibraries also allow you to use name and string literals as indexes to get at materials in them by name:

$foo.material = currentMaterialLibrary["Rough Gold"]

append currentMaterialLibrary $baz.material

constructors

currentMaterialLibrary      -- system global

materiallibrary { <material> }

you can create a temporary material library and add to it with array accessors, but there is currently no way to save it or make it the current library.

operators

<mat_lib>[<integer> | <name_lit> | <string>]

<mat_lib>[<integer> | <name_lit> | <string>] = <material>

methods<key_array>

append <mat_lib> <material>

delete <mat_lib> ( <integer> | <name_lit> | <string> )

properties

<mat_lib>.count