// =========================================================================== // 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: June 11, 1997 // // Procedure Name: // AEinputNew // // Description Name; // Creates a custom attribute editor control for a typed attribute type // In most of the cases it will be an input curve/surface/geometry // This procedure only allows single attributes. // // Input Value: // attribute UI name // nodeName.attributeName // // Output Value: // None // global proc AEinputReplace ( string $attributeUIName, string $input ) { string $connections[] = `listConnections -p true $input`; string $conInput[]; tokenize($connections[0], ".", $conInput); text -e -l $attributeUIName inputName; textField -e -tx $conInput[0] //-cc ("setAttr -type \"string\" " + $input + " #1") inputConnected; if ($conInput[0] == ""){ symbolButton -e -en 0 goToConnectedInput; } else { symbolButton -e -en 1 -c ("showEditor " + $conInput[0] ) goToConnectedInput; menuItem -e -l $connections[0] -c ("showEditor "+$conInput[0]) goToConnectedMenuItem; } } global proc AEinputNew ( string $attributeUIName, string $input ) { setUITemplate -pst attributeEditorTemplate; string $connections[] = `listConnections -p true $input`; string $conInput[]; tokenize($connections[0], ".", $conInput); rowLayout -nc 3;// -cat 3 both 0 -cal 3 center; text -l $attributeUIName inputName; textField -ed 0 -tx $conInput[0] //-cc ("setAttr -type \"string\" " + $input + " #1") inputConnected; if ($conInput[0] == ""){ symbolButton -i "inArrow.png" -en 0 goToConnectedInput; } else { symbolButton -i "inArrow.png" -c ("showEditor " + $conInput[0] ) goToConnectedInput; popupMenu -b 3 goToConnectedMenu; menuItem -l $connections[0] -c ("showEditor "+$conInput[0]) goToConnectedMenuItem; setParent -m ..; } setParent ..; setUITemplate -ppt; }