// =========================================================================== // 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. // =========================================================================== // Attribute Editor Template for basic selector node. // // scroll field does not listen to attribute changes initiated outside the // attribute editor itself. This would be necessary for production code. // PPT, 20-May-2015. // global proc AEbasicSelectorStaticSelectionChange(string $attrName) { string $staticSelection = `scrollField -q -text staticSelectionScrollField`; setAttr $attrName -type "string" $staticSelection; } global proc AEbasicSelectorStaticSelectionNew(string $attrName) { rowLayout -numberOfColumns 2 -adjustableColumn 2 -rowAttach 1 "top" 5; text -label (uiRes("m_AEbasicSelectorTemplate.kStaticSelection")); scrollField staticSelectionScrollField; setParent ..; AEbasicSelectorStaticSelectionReplace($attrName); } global proc AEbasicSelectorStaticSelectionReplace(string $attrName) { scrollField -edit -text `getAttr $attrName` -changeCommand ("AEbasicSelectorStaticSelectionChange \"" + $attrName + "\"") staticSelectionScrollField; } global proc AEbasicSelectorTemplate(string $nodeName) { editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEbasicSelectorTemplate.kOverrideProperties")) -collapse false; editorTemplate -label (uiRes("m_AEbasicSelectorTemplate.kPattern")) -addControl "pattern"; editorTemplate -callCustom "AEbasicSelectorStaticSelectionNew" "AEbasicSelectorStaticSelectionReplace" "staticSelection"; editorTemplate -endLayout; editorTemplate -suppress "customFilterValue"; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }