ShaderDef.AddShaderFamily operator


v9.0 (2011)


Adds a new shader family. Shader families specify the context in which the shader can be used (for example, you cannot connect a light shader to a material node for a scene item). In the UI, the context is identified by color: for example, Surface Material (siShaderFamilySurfaceMat) appears as green, Volume () appears as violet, Realtime shaders () appear as light blue, etc.

A shader definition must have at least one shader family defined but may also have one or more secondary families. One of these families is designated as the 'primary' family, and it is that family that determines what color the node displays in the UI. Softimage uses pre-defined families for mental ray and realtime shaders, but you can also define your own shader family with the XSIApplication.RegisterShaderFamily method.

Note: You cannot remove a shader family once it has been added.

C# Syntax

ShaderDef.AddShaderFamily( String in_str, Boolean in_bPrimary );

Scripting Syntax

ShaderDef.AddShaderFamily( in_str, [in_bPrimary] );


Parameter Type Description
in_str siShaderFamilyType The new shader family. The native shader families that ship with Softimage are described in Native Softimage Shader Families. You can also register custom shader families in Softimage and add them using this method. For more information, see Creating Custom Shader Families.
in_bPrimary Boolean True if this family is the primary shader family for the shader definition

Default Value: true

See Also

ShaderDef.IsShaderFamily ShaderDef.PrimaryShaderFamily ShaderDef.ShaderFamilies XSIApplication.RegisterShaderFamily Shader Families