// =========================================================================== // 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: // AEtexture2dCommon // // Description: // Creates the attribute editor controls without a scroll layout // for the texture2d Node // // Input Value: // nodeName // // Output Value: // None // // Add controls for common attributes from TdnTx2d global proc AEtexture2dCommon ( string $nodeName ) { // check on the type of the node // to place the correct widgets string $type = `nodeType $nodeName`; editorTemplate -beginLayout (uiRes("m_AEtexture2dCommon.kColorBalance")); // ADSK_CLR_MGT_BEGIN if ($type == "file") { editorTemplate -addControl "exposure"; } else if ($type == "movie") { editorTemplate -suppress "exposure"; } // ADSK_CLR_MGT_END editorTemplate -addControl "defaultColor"; editorTemplate -addControl "colorGain"; editorTemplate -addControl "colorOffset"; editorTemplate -addControl "alphaGain"; editorTemplate -addControl "alphaOffset"; if ($type == "cloth" || $type == "ramp" || $type == "stencil" ) { editorTemplate -suppress "alphaIsLuminance"; } else { editorTemplate -addControl "alphaIsLuminance"; } editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEtexture2dCommon.kEffects")); if ( $type == "bulge" || $type == "cloth" || $type == "ramp" || $type == "water" ) { editorTemplate -suppress "filter"; editorTemplate -suppress "filterOffset"; } else { editorTemplate -addControl "filter"; editorTemplate -addControl "filterOffset"; } editorTemplate -addControl "invert"; editorTemplate -callCustom "AEcolorRemapNew" "AEcolorRemapReplace" "outColor"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEtexture2dCommon.kUVCoordinates")); editorTemplate -addControl "uvCoord"; editorTemplate -endLayout; // include/call base class/node attributes AEdependNodeTemplate $nodeName; }