Shader.RendererOptionValue
 
 
 

Shader.RendererOptionValue

Introduced

v4.0

Description

Returns the value of a named option for the specified renderer. If either the renderer and/or the option doesn't exist for this shader, an empty variant is returned.

C# Syntax

Object Shader.RendererOptionValue( String in_Renderer, String in_OptioName );

Scripting Syntax

oVariant = Shader.RendererOptionValue( Renderer, OptionName );

Return Value

Variant

Parameters

Parameter Type Description
Renderer String Name of renderer to query the option for.
OptionName String Name of option to get the value of.

Examples

JScript Example

NewScene( null, false );
oCube = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" );
oShader = oCube.Material.surface.ConnectFromProgid( "Softimage.rh_renderer.1" );
LogMessage( "Shader Version: " + oShader.RendererOptionValue( "mental ray", "version" )  );
LogMessage( "Requires autovolume: " + oShader.RendererOptionValue( "mental ray", "autovolume" )  );
LogMessage( "Requires 1st derivative: " + oShader.RendererOptionValue( "mental ray", "derivative1" )  );
// INFO : "Shader Version: 1"
// INFO : "Requires autovolume: true"
// INFO : "Requires 1st derivative: undefined"

See Also

Shader.HasRenderer Shader.SymbolName Shader.CodePath Shader.CodeText