// =========================================================================== // 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: // AEoceanShaderTemplate // // Description Name; // Creates the attribute editor controls for the lambert Node // // Input Value: // nodeName // // Output Value: // None // global proc AEoceanShaderBumpNew (string $attrName) { setUITemplate -pst attributeEditorTemplate; attrNavigationControlGrp -label (uiRes("m_AEoceanShaderTemplate.kBumpMapping")) -at $attrName bumpControl; setUITemplate -ppt; } global proc AEoceanShaderBumpReplace (string $attrName) { attrNavigationControlGrp -edit -at $attrName bumpControl; } global proc AEoceanShaderTemplate ( string $nodeName ) { AEswatchDisplay $nodeName; editorTemplate -beginScrollLayout; editorTemplate -callCustom AEshaderTypeNew AEshaderTypeReplace "message"; editorTemplate -beginLayout (uiRes("m_AEoceanShaderTemplate.kOceanAttributes")) -collapse 1; editorTemplate -addControl "scale"; editorTemplate -addControl "time"; editorTemplate -addControl "windUV"; editorTemplate -addControl "waveSpeed"; editorTemplate -addControl "observerSpeed"; editorTemplate -addSeparator; editorTemplate -addControl "numFrequencies"; editorTemplate -addControl "waveDirSpread"; editorTemplate -addControl "waveLengthMin"; editorTemplate -addControl "waveLengthMax"; AEaddRampControl ($nodeName+".waveHeight"); AEaddRampControl ($nodeName+".waveTurbulence"); AEaddRampControl ($nodeName+".wavePeaking"); editorTemplate -addControl "waveHeightOffset"; editorTemplate -addSeparator; editorTemplate -addControl "foamEmission"; editorTemplate -addControl "foamThreshold"; editorTemplate -addControl "foamOffset"; editorTemplate -addSeparator; editorTemplate -addControl "bumpBlur"; editorTemplate -addControl "horizonFilter"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEoceanShaderTemplate.kCommonMaterialAttributes")) -collapse 1; editorTemplate -addControl "waterColor"; editorTemplate -addControl "foamColor"; editorTemplate -addControl "transparency"; editorTemplate -addControl "refractiveIndex"; editorTemplate -addControl "incandescence"; editorTemplate -addControl "ambientColor"; editorTemplate -addControl "diffuse"; editorTemplate -addControl "troughShadowing"; editorTemplate -addSeparator; editorTemplate -addControl "translucence"; editorTemplate -addControl "translucenceFocus"; editorTemplate -addControl "translucenceDepth"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEoceanShaderTemplate.kSpecularShading")) -collapse 1; editorTemplate -addControl "specularity"; editorTemplate -addControl "eccentricity"; editorTemplate -addControl "specularColor"; editorTemplate -addSeparator; editorTemplate -addControl "reflectivity"; AEaddRampControl ($nodeName+".environment"); editorTemplate -addControl "reflectedColor"; editorTemplate -addControl "reflectedAlpha"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEoceanShaderTemplate.kGlow")) -collapse 1; // editorTemplate -addControl "hideSource"; editorTemplate -addControl "glowIntensity"; editorTemplate -addControl "specularGlow"; editorTemplate -endLayout; AEblackHoleControl $nodeName; // supressed attributes editorTemplate -suppress "pointCamera"; editorTemplate -suppress "normalCamera"; editorTemplate -suppress "rayDirection"; editorTemplate -suppress "outFoam"; editorTemplate -suppress "displacement"; editorTemplate -beginLayout (uiRes("m_AEoceanShaderTemplate.kRaytraceOptions")) -collapse 1; editorTemplate -addControl "refractions"; 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_AEoceanShaderTemplate.kHardwareTexturing")) -collapse true; AEhardwareTextureTemplate $nodeName ("waterColor foamColor transparency ambientColor incandescence "+ "normalCamera diffuse translucence eccentricity "+ "specularColor reflectivity "+ "reflectedColor"); editorTemplate -endLayout; } // include/call base class/node attributes AEdependNodeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }