Scene.ActiveMaterialLibrary

Introduced

v4.0

Description

Returns the currently active MaterialLibrary. A material library is a common container for materials used in a scene. Every Material you create is added to a library. You can then assign it to one or more objects (or clusters, hierarchies, groups, partitions, and so on). This makes it easy to share a single material between multiple scene elements while having only the one material to manage.

C# Syntax

// get accessor
Library rtn = Scene.ActiveMaterialLibrary;

Examples

JScript Example

/*
	This example demonstrates how to get the current material library
*/
NewScene( null, false );
var matlib = ActiveProject.ActiveScene.ActiveMaterialLibrary;
LogMessage( matlib );
// Expected result:
//INFO : Sources.Materials.DefaultLib

See Also

Scene.MaterialLibraries Material Library MaterialLibrary SetCurrentMaterialLibrary CreateLibrary MoveToLibrary SICreateMaterial