// =========================================================================== // 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. // =========================================================================== // // Common attributes to TextureBakeSet and VertexBakeSet // global proc colorModeChanged (string $nodeName) { string $nodeAttr = $nodeName + ".colorMode"; int $value = `getAttr $nodeAttr`; if( $value == 3 ) { editorTemplate -dimControl $nodeName "occlusionRays" false; editorTemplate -dimControl $nodeName "occlusionFalloff" false; editorTemplate -dimControl $nodeName "customShader" true; } else if( $value == 4 ) { editorTemplate -dimControl $nodeName "occlusionRays" true; editorTemplate -dimControl $nodeName "occlusionFalloff" true; editorTemplate -dimControl $nodeName "customShader" false; } else { editorTemplate -dimControl $nodeName "occlusionRays" true; editorTemplate -dimControl $nodeName "occlusionFalloff" true; editorTemplate -dimControl $nodeName "customShader" true; } } global proc AEbakeSetCustomShaderNew(string $messagePlug) { attrNavigationControlGrp -label (uiRes("m_AEbakeSetTemplate.kCustomShader")) BakeCustomShaderCtrl; AEbakeSetCustomShaderReplace($messagePlug); } global proc AEbakeSetCustomShaderReplace(string $messagePlug) { attrNavigationControlGrp -edit -attribute $messagePlug BakeCustomShaderCtrl; } global proc AEbakeSetTemplate( string $nodeName ) { editorTemplate -addControl "colorMode" "colorModeChanged"; editorTemplate -addControl "occlusionRays"; editorTemplate -addControl "occlusionFalloff"; editorTemplate -callCustom "AEbakeSetCustomShaderNew" "AEbakeSetCustomShaderReplace" "customShader"; editorTemplate -addControl "normalDirection"; editorTemplate -addControl "orthogonalReflection"; editorTemplate -suppress "separation"; }