// =========================================================================== // 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. // =========================================================================== // // // Creation Date: May 10, 1997 // // Procedure Name: // AEdirectionalLightTemplate // // Description: // Creates the attribute editor controls for the directionalLight Node // // Input Value: // nodeName // // Output Value: // None // global proc AEdirectionalLightTemplate ( string $nodeName ) { AEswatchDisplay $nodeName; editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEdirectionalLightTemplate.kDirectionalLightAttr")) -collapse 0; AElightCommon $nodeName; // include/call base class/node attributes AEnonAmbientLightShapeNodeDecay $nodeName; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEdirectionalLightTemplate.kShadows")); // include the second part of the lightNode editorTemplate -addControl "shadowColor"; // include the depth map part of the nonExtendedLightShapeNode AEnonExtendedLightShapeDepthMapAttr $nodeName; editorTemplate -beginLayout (uiRes("m_AEdirectionalLightTemplate.kRaytraceShadowAttr")) -collapse 0; editorTemplate -addControl "useRayTraceShadows" "checkUseRayTraceShadows2"; editorTemplate -addControl "lightAngle"; // include the third (last) part of the lightNode AElightCommonShadow2 $nodeName; editorTemplate -endLayout; // include all other inherited attrs AEshapeTemplate $nodeName; //suppressed attributes editorTemplate -suppress "pointWorld"; editorTemplate -suppress "objectType"; editorTemplate -suppress "farPointWorld"; editorTemplate -suppress "lightRadius"; editorTemplate -suppress "castSoftShadows"; editorTemplate -suppress "receiveShadows"; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; } // // Procedure Name: // checkUseRayTraceShadows2 // global proc checkUseRayTraceShadows2 ( string $nodeName ) { string $nodeAttr = $nodeName + ".useRayTraceShadows"; int $value = `getAttr $nodeAttr`; if ( $value == 1 ) { editorTemplate -dimControl $nodeName "lightAngle" false; editorTemplate -dimControl $nodeName "shadowRays" false; editorTemplate -dimControl $nodeName "rayDepthLimit" false; } else { editorTemplate -dimControl $nodeName "lightAngle" true; editorTemplate -dimControl $nodeName "shadowRays" true; editorTemplate -dimControl $nodeName "rayDepthLimit" true; } }