// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Procedure Name: // defaultShaderType // // Description: // Returns the type of the default shader, that is, the shader associated // with the "initialShadingGroup". // // Input Arguments: // None. // // Return Value: // None. // global proc string defaultShaderType() { global string $gDefaultShaderType = ""; if( $gDefaultShaderType == "" ){ // Get type of defaultShaderName() // string $defaultShaderName = defaultShaderName(); if( `objExists $defaultShaderName` ){ $gDefaultShaderType = `nodeType $defaultShaderName`; } else { // Couldn't find it by examining initialShadingGroup; use // hard-coded name instead // $gDefaultShaderType = "lambert"; } } return $gDefaultShaderType; }