v4.0
Assigns a Material to a list of objects.
oReturn = SICreateMaterial( PresetObj, [Name], [Library], [Objects], [AssignToList], [Initialize] ); |
Nothing
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 |
' 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" |
' 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" |
' 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" |