// =========================================================================== // 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: // AErampShaderTemplate // // Description Name; // Creates the attribute editor controls for the lambert Node // // Input Value: // nodeName // // Output Value: // None // global proc AErampShaderBumpNew (string $attrName) { setUITemplate -pst attributeEditorTemplate; attrNavigationControlGrp -label (uiRes("m_AErampShaderTemplate.kBumpMapping")) -at $attrName bumpControl; setUITemplate -ppt; } global proc AErampShaderBumpReplace (string $attrName) { attrNavigationControlGrp -edit -at $attrName bumpControl; } global proc AErampShaderCheckShadowMode( string $node ) { int $mode = `getAttr ($node + ".shadowMode")`; editorTemplate -dimControl $node "shadowColor" ($mode == 0); editorTemplate -dimControl $node "shadowThreshold" ($mode == 0); } global proc AErampShaderTemplate ( string $nodeName ) { AEswatchDisplay $nodeName; editorTemplate -beginScrollLayout; editorTemplate -callCustom AEshaderTypeNew AEshaderTypeReplace "message"; editorTemplate -beginLayout (uiRes("m_AErampShaderTemplate.kCommonMaterialAttr")) -collapse 0; AEaddRampControl ($nodeName+".color"); AEaddRampControl ($nodeName+".transparency"); AEaddRampControl ($nodeName+".incandescence"); editorTemplate -addControl "ambientColor"; editorTemplate -callCustom "AErampShaderBumpNew" "AErampShaderBumpReplace" "normalCamera"; editorTemplate -addControl "diffuse"; editorTemplate -addControl "forwardScatter"; editorTemplate -addSeparator; editorTemplate -addControl "translucence"; editorTemplate -addControl "translucenceFocus"; editorTemplate -addControl "translucenceDepth"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AErampShaderTemplate.kSpecularShading")) -collapse 0; editorTemplate -addControl "specularity"; editorTemplate -addControl "eccentricity"; AEaddRampControl ($nodeName+".specularColor"); AEaddRampControl ($nodeName+".specularRollOff"); editorTemplate -addSeparator; AEaddRampControl ($nodeName+".reflectivity"); AEaddRampControl ($nodeName+".environment"); editorTemplate -addControl "reflectedColor"; editorTemplate -addControl "reflectedAlpha"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AErampShaderTemplate.kShadowControl")) -collapse true; editorTemplate -addControl "shadowMode" "AErampShaderCheckShadowMode"; editorTemplate -addControl "shadowColor"; editorTemplate -addControl "shadowThreshold"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AErampShaderTemplate.kSpecialEffects")); editorTemplate -addControl "hideSource"; editorTemplate -addControl "glowIntensity"; editorTemplate -addControl "specularGlow"; editorTemplate -endLayout; AEblackHoleControl $nodeName; // supressed attributes editorTemplate -suppress "pointCamera"; editorTemplate -suppress "rayDirection"; editorTemplate -beginLayout (uiRes("m_AErampShaderTemplate.kRaytraceOptions")); editorTemplate -addControl "refractions"; editorTemplate -addControl "refractiveIndex"; editorTemplate -addControl "refractionLimit"; editorTemplate -addControl "lightAbsorbance"; editorTemplate -addControl "surfaceThickness"; editorTemplate -addControl "shadowAttenuation"; editorTemplate -addControl "chromaticAberration"; editorTemplate -addSeparator; editorTemplate -addControl "reflectionLimit"; editorTemplate -addControl "reflectionSpecularity"; editorTemplate -endLayout; if(isLegacyViewportEnabled()) { // // Add the Hardware texture section only if the user enable the legacy viewport // editorTemplate -beginLayout (uiRes("m_AErampShaderTemplate.kHardwareTexturing")) -collapse true; AEhardwareTextureTemplate $nodeName ("color transparency ambientColor incandescence "+ "normalCamera diffuse translucence eccentricity "+ "specularRollOff specularColor reflectivity "+ "reflectedColor"); editorTemplate -endLayout; } // include/call base class/node attributes AEdependNodeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }