SICreateMaterial

Introduced

v4.0

Description

Assigns a Material to a list of objects.

Scripting Syntax

oReturn = SICreateMaterial( PresetObj, [Name], [Library], [Objects], [AssignToList], [Initialize] );

Return Value

Nothing

Parameters

Parameter Type Description
PresetObj String A preset from one of the following lists: Material (Surface) Shader Presets, Illumination (Surface) Shader Presets, Raytracing (Surface) Shader Presets, Legacy Shader Presets, Subsurface Shader Presets
Name String Name of the material

Default Value: "Material"

Library String Library that will receive the new material.

Default Value: Current selection

Objects String Objects that will be assigned the new material.

Default Value: Current selection

AssignToList Boolean True to assign the material to the list of objects.

Default Value: true

Initialize Boolean True to initialize

Default Value: true

Examples

1. VBScript Example

' The following example uses SIAssignMaterial to 

' assign a default material to the given object. 

NewScene , false

CreatePrim "Cone", "MeshSurface"

DeselectAll

SICreateMaterial 

SIAssignMaterial "Cone","Sources.Materials.DefaultLib.Scene_Material"

2. VBScript Example

' The following example uses SIAssignMaterial to  

' assign a Blinn material to the given object. 

NewScene , false 

CreatePrim "Cone", "MeshSurface" 

DeselectAll 

SICreateMaterial "Blinn","Blinn"

SIAssignMaterial "Cone","Sources.Materials.DefaultLib.Blinn"

3. VBScript Example

' The following example uses SIAssignMaterial to  

' assign a constant material to the given object. 

NewScene , false 

CreatePrim "Cone", "MeshSurface" 

DeselectAll 

SICreateMaterial "Constant", "Constant"

SIAssignMaterial "Cone","Sources.Materials.DefaultLib.Material"

See Also

AddProp SIAddProp