NewScene( null, false );
oCube = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" );
oShader1 = oCube.Material.surface.ConnectFromProgid( "Softimage.material-lambert.1" );
oShader2 = oCube.Material.shadow.ConnectFromProgid( "Softimage.sib_diffuse_reflection.1" );
LogMessage( "Shader 1 supports mental ray: " + oShader1.HasRenderer( "mental ray" ) );
LogMessage( "Shader 1 supports Cg: " + oShader1.HasRenderer( "Cg" ) );
LogMessage( "Shader 2 supports mental ray: " + oShader2.HasRenderer( "mental ray" ) );
LogMessage( "Shader 2 supports Cg: " + oShader2.HasRenderer( "Cg" ) );
//INFO : "Shader 1 supports mental ray: true"
//INFO : "Shader 1 supports Cg: true"
//INFO : "Shader 2 supports mental ray: true"
//INFO : "Shader 2 supports Cg: false" |