v4.0
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.
oReturn = InsertShader( PresetObj, InputObjs, [Name] ); |
Returns the newly created shaders.
Parameter | Type | Description |
---|---|---|
PresetObj | String or a preset object (see SIGetPreset) | Shader Presets |
InputObjs | String |
List of shader connection points. Default Value: Current selection |
Name | String | Name for the inserted shader |
' 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" |