// =========================================================================== // 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: // AElayeredShaderTemplate // // Description Name; // Creates the attribute editor controls for the layeredShader Node // // Input Value: // nodeName // // Output Value: // None // // // Procedure Name: // AElayeredShaderInteractivePortNew // global proc AElayeredShaderInteractivePortNew (string $inputs) { // Crack an attribute name open to get the name of the node // string $layeredName[]; tokenize($inputs, ".", $layeredName); string $portName = `layeredShaderPort -node $layeredName[0] layeredPort`; /////////////////////////////////////////////////////// // Create the controls for adjusting the color and the // transparency setUITemplate -pst attributeEditorTemplate; string $selectedColorControl = `attrColorSliderGrp -label (uiRes("m_AElayeredShaderTemplate.kColor")) selectedColorControl`; string $selectedTransparencyControl = `attrColorSliderGrp -label (uiRes("m_AElayeredShaderTemplate.kTransparency")) selectedTransparencyControl`; setUITemplate -ppt; // //////////////////////////////////////////////////////// layeredShaderPort -e -scc $selectedColorControl $portName; layeredShaderPort -e -stc $selectedTransparencyControl $portName; } // // Procedure Name: // AElayeredShaderInteractivePortReplace // global proc AElayeredShaderInteractivePortReplace (string $inputs) { // Crack an attribute name open to get the name of the node // string $layeredName[]; tokenize($inputs, ".", $layeredName); layeredShaderPort -edit -node $layeredName[0] layeredPort; } // // Procedure Name: // AElayeredShaderTemplate // global proc AElayeredShaderTemplate ( string $nodeName ) { AEswatchDisplay $nodeName; editorTemplate -beginScrollLayout; editorTemplate -callCustom AEshaderTypeNew AEshaderTypeReplace "message"; editorTemplate -beginLayout (uiRes("m_AElayeredShaderTemplate.kLayeredShaderAttr")) -collapse 0; editorTemplate -callCustom "AElayeredShaderInteractivePortNew" "AElayeredShaderInteractivePortReplace" "inputs"; editorTemplate -addControl "compositingFlag"; editorTemplate -addControl "renderPassMode"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AElayeredShaderTemplate.kHardwareShadingAttr")) -collapse true; editorTemplate -addControl "hardwareColor"; editorTemplate -s "hardwareShader"; editorTemplate -endLayout; AEblackHoleControl $nodeName; // include/call base class/node attributes AEdependNodeTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }