// =========================================================================== // 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 polySelect tool options // global proc polySelectOptionsPopup() { string $toolName = `currentCtx`; // Parent menu already set when this function is called, // so just add a menu items int $mode = `polySelectCtx -q -mode $toolName`; string $loopLabel = (uiRes("m_polySelectOptionsPopup.kLoopLabel")); string $ringLabel = (uiRes("m_polySelectOptionsPopup.kRingLabel")); string $borderLabel = (uiRes("m_polySelectOptionsPopup.kBorderLabel")); menuItem -l $loopLabel -rp "W" -cb ($mode == 0) -c ("polySelectCtx -e -mode 0 -i1 polySelectEdgeLoop.png " + $toolName + "; changeToolIcon"); menuItem -l $ringLabel -rp "E" -cb ($mode == 1) -c ("polySelectCtx -e -mode 1 -i1 polySelectEdgeRing.png " + $toolName + "; changeToolIcon"); menuItem -l $borderLabel -rp "N" -cb ($mode == 2) -c ("polySelectCtx -e -mode 2 -i1 polySelectEdgeBorder.png " + $toolName + "; changeToolIcon"); }