GetShaderInputType (Camera)

Introduced

5.0

Description

Returns the shader input type for a parameter. If the parameter cannot be connected to a shader, GetShaderInputType returns siUnknownParameterType.

Scripting Syntax

    Camera.GetShaderInputType( ParameterScriptName )

C# Syntax

    siShaderParameterType Camera.GetShaderInputType( String Parametername );

Parameters

Parameter | Type | Description
ParameterScriptName | String | Script name of parameter

Return Value

siShaderParameterType

Examples

JScript Example

    // Create a camera
    var root = Application.ActiveProject.ActiveScene.Root;
    var camera = root.AddCamera( "Wide_Angle", "WideAngleLens" );

    // List the names and input types of all parameters that support shader connections
    var eParams = new Enumerator(camera.parameters);

    for ( ; !eParams.atEnd(); eParams.moveNext() )
    {
       var param = eParams.item();

       if (param.capabilities & siTexturable)
       {
           var inputtype = camera.GetShaderInputType(param.scriptname);
           // This parameter supports a shader connection
           logmessage( param.fullname + " has shader inputtype = " + ShaderParameterTypeAsText(type) );
       }
              }
    function ShaderParameterTypeAsText(type)
    {
       switch (type)
       {
           case siUnknownParameterType : return "siUnknownParameterType";
           case siBooleanParameterType : return "siBooleanParameterType";
           case siColorParameterType : return "siColorParameterType";
           case siDataParameterType : return "siDataParameterType";
           case siIntegerParameterType : return "siIntegerParameterType";
           case siLensParameterType : return "siLensParameterType";
           case siLightParameterType : return "siLightParameterType";
           case siMaterialParameterType : return "siMaterialParameterType";
           case siMatrixParameterType : return "siMatrixParameterType";
           case siModelParameterType : return "siModelParameterType";
           case siRealTimeParameterType : return "siRealTimeParameterType";
           case siReferenceParameterType : return "siReferenceParameterType";
           case siScalarParameterType : return "siScalarParameterType";
           case siShaderParameterType : return "siShaderParameterType";
           case siStringParameterType : return "siStringParameterType";
           case siStructParameterType : return "siStructParameterType";
           case siTextureParameterType : return "siTextureParameterType";
           case siTextureSpaceParameterType : return "siTextureSpaceParameterType";
           case siVectorParameterType : return "siVectorParameterType";

           default: return inputtype;
       }
    }
    //INFO : Camera1.camera.lensshader has shader inputtype = siColorParameterType

See Also

Shader.OutputType | Parameter.ScriptName

Autodesk Softimage v7.5