// =========================================================================== // 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. // =========================================================================== // // Create popup menu for the extrude face node options. // This is called from the showManipsCtx which already // has the parent menu set. // global proc polyExtrudeFaceOptionsPopup( string $node ) { int $kftValue = `getAttr ($node + ".keepFacesTogether")`; string $kftLabel = (uiRes("m_polyExtrudeFaceOptionsPopup.kKeepFacesTogetherLabel")); string $kftCommand = ("setAttr " + $node + ".keepFacesTogether " + !($kftValue)); string $shEdgeLabel = (uiRes("m_polyExtrudeFaceOptionsPopup.kSoftenHardenLabel")); string $sEdgeLabel = (uiRes("m_polyExtrudeFaceOptionsPopup.kSoftenLabel")); string $sEdgeCommand = ("setAttr " + $node + ".smoothingAngle 180"); string $hEdgeLabel = (uiRes("m_polyExtrudeFaceOptionsPopup.kHardenLabel")); string $hEdgeCommand = ("setAttr " + $node + ".smoothingAngle 0"); int $showSlidersOptVar[] = `manipOptions -q -showExtrudeSliders`; string $showSlidersCommand = (" manipOptions -showExtrudeSliders " + (!$showSlidersOptVar[0]) + ";"); menuItem -label $kftLabel -radialPosition "S" -command $kftCommand ; menuItem -label $shEdgeLabel -radialPosition "SE" -subMenu 1 ; menuItem -label $sEdgeLabel -command $sEdgeCommand -radialPosition "SE" -enableCommandRepeat 1 ; menuItem -label $hEdgeLabel -command $hEdgeCommand -radialPosition "NE" -enableCommandRepeat 1 ; setParent -m ..; }