// =========================================================================== // 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. // =========================================================================== global proc PolygonsSubdivideMenu(string $parent) // // Description: // Polygon Subdivide menu // { if (! `isTrue "PolygonsExists"`) return; setParent -m $parent; if (`menu -q -ni $parent` == 0) { menuItem -label (uiRes("m_PolygonsSubdivideMenu.kSubdivProxy")) -ecr true -image "polySmoothProxy.png" -annotation (getRunTimeCommandAnnotation("SmoothProxy")) -command "SmoothProxy" -dragMenuCommand "SmoothProxy" -dragDoubleClickCommand "SmoothProxyOptions"; menuItem -optionBox 1 -image "polySmoothProxy.png" -annotation (getRunTimeCommandAnnotation("SmoothProxyOptions")) -enableCommandRepeat false -command "SmoothProxyOptions"; $cmd = "UnmirrorSmoothProxy"; menuItem -label (uiRes("m_PolygonsSubdivideMenu.kRemoveSubdivProxyMirror")) -ecr true -image "polyUnmirrorSmoothProxy.png" -annotation (getRunTimeCommandAnnotation($cmd)) -dragDoubleClickCommand "performUnmirrorSmoothProxy 1" -dragMenuCommand "performUnmirrorSmoothProxy 0" -command $cmd; menuItem -optionBox 1 -i "polyUnmirrorSmoothProxy.png" -annotation (uiRes("m_PolygonsSubdivideMenu.kRemoveSubdivProxyMirrorOptionsAnnot")) -ecr false -c "UnmirrorSmoothProxyOptions"; $cmd = "PolyCreaseTool"; menuItem -label (uiRes("m_PolygonsSubdivideMenu.kNewCreasePolyTool")) -ecr true -i "polyCrease.png" -annotation (getRunTimeCommandAnnotation($cmd)) -c $cmd -dmc $cmd -ddc "PolyCreaseToolOptions"; $cmd = "PolyCreaseToolOptions"; menuItem -optionBox 1 -ecr false -i "polyCrease.png" -annotation (getRunTimeCommandAnnotation($cmd)) -c $cmd; menuItem -divider true; $cmd = "SmoothingDisplayToggle"; menuItem -label (uiRes("m_PolygonsSubdivideMenu.kNewTogProxyDisplay")) -annotation (getRunTimeCommandAnnotation($cmd)) -image "polyToggleProxy.png" -command $cmd ; $cmd = "SmoothingDisplayShowBoth"; menuItem -label (uiRes("m_PolygonsSubdivideMenu.kNewBothProxySubdivDisplay")) -annotation (getRunTimeCommandAnnotation($cmd)) -image "polyToggleProxySubdiv.png" -command $cmd ; setParent -m ..; } }