FindShaders (Camera)
Introduced
5.0
Description
Gets all shaders applied to the camera that match a filter. If no matching shaders are found, FindShaders returns an empty collection.
Scripting Syntax
Camera.FindShaders( Filter )
C# Syntax
ShaderCollection Camera.FindShaders( String Filter );Parameters
|
Parameter |
Type |
Description |
|
Filter |
Name of a shader Filter object. For example, you can use siShaderFilter (the standard Softimage shader filter), or you can use a custom filter. |
Return Value
Examples
JScript Example
// Create a camera and apply a shader to lens var root = Application.ActiveProject.ActiveScene.Root; // Create a point light var light = root.AddLight( "Point", true, "PointLight" ); // Set up the camera with lens flare var camera = root.AddCamera( "Camera", "Camera" ); translate( camera, 4, 6, 4); var flare = camera.parameters("lensshader").connectfromprogid("Softimage.FLARES.LEN"); flare.parameters("lights").addvalue(light); // Find all shaders applied to camera var shaders = camera.FindShaders(siShaderFilter); var eShaders = new Enumerator(shaders) logmessage( "Number of shaders applied to camera: "); for ( ; !eShaders.atEnd(); eShaders.moveNext() ) { var shader = eShaders.item(); logmessage( "camera shader: " + shader.progid ); } //INFO : Number of shaders applied to camera: //INFO : camera shader: Softimage.FLARES.LEN.1
See Also
Autodesk Softimage v7.5