Detecting Shader Families

 
 
 

To find what shader families are defined on an existing shader definition

To find out the primary family defined on an existing shader definition

To find out whether the specified family is defined as one of the shader families for an existing shader definition

To assign registered shader families to a custom shader definitions

  • Use ShaderDef.AddShaderFamily or ShaderDef::AddShaderFamily, passing the shader family name for each shader family you want to add; however, the second parameter determines whether that family will be primary or not. So if you don't pass a value for that parameter, the last family added will be considered the primary family:

    # Adds the lens shader family only
    oShaderDef.AddShaderFamily(siShaderFamilyLens)
    
    # Adds the data blob and texture families with texture as primary (because it's 
    # the most versatile shader family--it has the fewest connection restrictions of anything)
    oShaderDef.AddShaderFamily(siShaderFamilyTexture, True)
    oShaderDef.AddShaderFamily(siShaderFamilyData, False)
    
    # Same thing but without specifying second parameter
    oShaderDef.AddShaderFamily(siShaderFamilyData)
    oShaderDef.AddShaderFamily(siShaderFamilyTexture)
Note

To register a custom shader family in Softimage, see Creating Custom Shader Families. To use one of the native Softimage shader families, consult Native Softimage Shader Families for a list of supported families.