// =========================================================================== // 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 polyCreateAppendOptionsPopup(string $cmdName, string $toolName) { string $DivisionsLabel = (uiRes("m_polyCreateAppendOptionsPopup.kDivisions")); string $PlanarFacesLabel = (uiRes("m_polyCreateAppendOptionsPopup.kPlanarFaces")); string $LimitNumPointsLabel = (uiRes("m_polyCreateAppendOptionsPopup.kLimitPoints")); string $TextureSpaceLabel = (uiRes("m_polyCreateAppendOptionsPopup.kTextureSpace")); string $NormalizeLabel = (uiRes("m_polyCreateAppendOptionsPopup.kNormalize")); string $UnitizeLabel = (uiRes("m_polyCreateAppendOptionsPopup.kUnitize")); string $NoneLabel = (uiRes("m_polyCreateAppendOptionsPopup.kNone")); string $NoLimitLabel = (uiRes("m_polyCreateAppendOptionsPopup.kNoLimit")); string $OneLabel = (uiRes("m_polyCreateAppendOptionsPopup.kOne")); string $TwoLabel = (uiRes("m_polyCreateAppendOptionsPopup.kTwo")); string $ThreeLabel = (uiRes("m_polyCreateAppendOptionsPopup.kThree")); string $FourLabel = (uiRes("m_polyCreateAppendOptionsPopup.kFour")); string $FiveLabel = (uiRes("m_polyCreateAppendOptionsPopup.kFive")); string $SixLabel = (uiRes("m_polyCreateAppendOptionsPopup.kSix")); int $PlanarFacesVal = eval($cmdName + " -q -planarConstraint " + $toolName); int $TextureVal = eval($cmdName + " -q -texture " + $toolName); menuItem -label $DivisionsLabel -radialPosition "W" -subMenu 1; menuItem -label $OneLabel -command ($cmdName + " -edit -subdivision 1 " + $toolName) -radialPosition "W"; menuItem -label $TwoLabel -command ($cmdName + " -edit -subdivision 2 " + $toolName) -radialPosition "N"; menuItem -label $ThreeLabel -command ($cmdName + " -edit -subdivision 3 " + $toolName) -radialPosition "E"; menuItem -label $FourLabel -command ($cmdName + " -edit -subdivision 4 " + $toolName) -radialPosition "S"; setParent -m ..; menuItem -label $LimitNumPointsLabel -radialPosition "E" -subMenu 1; menuItem -label $NoLimitLabel -command ($cmdName + " -e -maximumNumberOfPoints -1 " + $toolName) -radialPosition "E"; menuItem -label $ThreeLabel -command ($cmdName + " -e -maximumNumberOfPoints 3 " + $toolName) -radialPosition "W"; menuItem -label $FourLabel -command ($cmdName + " -e -maximumNumberOfPoints 4 " + $toolName) -radialPosition "NW"; menuItem -label $FiveLabel -command ($cmdName + " -e -maximumNumberOfPoints 5 " + $toolName) -radialPosition "N"; menuItem -label $SixLabel -command ($cmdName + " -e -maximumNumberOfPoints 6 " + $toolName) -radialPosition "NE"; setParent -m ..; menuItem -checkBox $PlanarFacesVal -label $PlanarFacesLabel -command ("togglePolyPlanarConstraints") -radialPosition "S"; menuItem -label $TextureSpaceLabel -radialPosition "N" -subMenu 1; menuItem -label $NormalizeLabel -checkBox (1 == $TextureVal) -command ($cmdName + " -e -texture 1 " + $toolName) -radialPosition "N"; menuItem -label $UnitizeLabel -checkBox (2 == $TextureVal) -command ($cmdName + " -e -texture 2 " + $toolName) -radialPosition "W"; menuItem -label $NoneLabel -checkBox (0 == $TextureVal) -command ($cmdName + " -e -texture 0 " + $toolName) -radialPosition "E"; setParent -m ..; }