Introduced
4.0
Description
Inserts a shader between the supplied port and a shader attached to this port. Any existing shader on the specified port will be moved to the main input port of the shader.
Scripting Syntax
InsertShader( PresetObj, InputObjs, [Name] )
Parameters
|
Parameter |
Type |
Description |
|
PresetObj |
String or a preset object (see SIGetPreset) |
|
|
InputObjs |
List of shader connection points. Default Value: Current selection |
|
|
Name |
Name for the inserted shader |
Return Value
Returns the newly created shaders.
Examples
VBScript Example
' Create a sphere, add a default material and texture projection NewScene , false CreatePrim "Sphere", "MeshSurface" ApplyShader , , , , siLetLocalMaterialsOverlap CreateProjection "sphere", siTxtPlanarXY, siTxtDefaultSpherical, "Texture_Support", "Texture_Projection" ' Connect an image shader to the diffuse port of the Phong SIApplyShaderToCnxPoint "Image", "Sources.Materials.DefaultLib.Material.Phong.diffuse" ' Insert an invert node between the Phong and the Image node InsertShader "Image_Processing\Invert", "Sources.Materials.DefaultLib.Material.Phong.diffuse"
See Also
Autodesk Softimage v7.5