BlendInTextureLayer sWithPortsInsp

Introduced

4.0

Description

Creates and returns layers with the requested presets, and adds the provided ports to the layers.

Note: This command is the same as BlendInTextureLayersWithPorts except that it also inspects the newly created shaders.

Scripting Syntax

    BlendInTextureLayersWithPortsInsp( [PresetNames], [InputObjs] )

Parameters

Parameter | Type | Description
PresetNames | String | Shader Presets corresponding to the shaders and/or images you want to connect Default Value: "Image"
InputObjs | String | List of shader connections to blend in new layers Default Value: Current selection

Return Value

Returns the layers created as an XSICollection.

Examples

VBScript Example

    '
    ' This example demonstrates how to apply blended shaders to a specific connection
    ' point on a cube. It also shows how to access the shader information both from the
    ' collection returned by BlendInTextureLayersWithPortsInsp and through the object's material.
    '

    NewScene , false

    ' Create a default cube and apply a default Phong shader:
    Set oBox = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" )
    ApplyShader , oBox

    ' Apply Cloud and Gradient presets on the cube's Material Surface port:
    Set oLayers = BlendInTextureLayersWithPortsInsp( "Cloud,Gradient", _
       oBox.Material.Parameters( "Surface" ) )

    ' At this point you will also see a Multiple Property Sets page pop up for the shaders.

    ' Now display the name of the created layers:
    For Each oLayer In oLayers
       Set oShader = SIGetShaderOnCnxPoint( oLayer & ".color" )
       Application.LogMessage oLayer.Name & " created with shader " & oShader.Name
    Next

    ' View the results in a rendered frame. (The colors appear quite smooth.)
    RenderPasses oDefPass, 1, 1

    ' Set the mode of the Gradient to "Darken":
    SetValue oBox.Material & ".Gradient_Layer.mode", 8

    ' View the results in a rendered frame. (Now the colors seem to have a mottled effect.)
    RenderPasses oDefPass, 1, 1

    ' Output of above script:
    'INFO : "Cloud_Layer created with shader Cloud"
    'INFO : "Gradient_Layer created with shader Gradient"

See Also

BlendInTextureLayers | BlendInTextureLayersInsp | BlendInTextureLayersWithPorts | BlendClipsInTextureLayers
BlendClipsInTextureLayersInsp | BlendClipsInTextureLayersWithPorts |  |

Autodesk Softimage v7.5