// =========================================================================== // 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 polyCutOptionsPopup( string $node ) { int $deleteFaces = `getAttr ($node + ".deleteFaces")`; int $extractFaces = `getAttr ($node + ".extractFaces")`; string $simpleLabel = (uiRes("m_polyCutOptionsPopup.kSimpleLabel")); string $deleteFacesLabel = (uiRes("m_polyCutOptionsPopup.kDeleteLabel")); string $extractFacesLabel = (uiRes("m_polyCutOptionsPopup.kExtractLabel")); string $YZLabel = (uiRes("m_polyCutOptionsPopup.kYZLabel")); string $ZXLabel = (uiRes("m_polyCutOptionsPopup.kZXLabel")); string $XYLabel = (uiRes("m_polyCutOptionsPopup.kXYLabel")); string $simpleCmd = ("setAttr " + $node + ".deleteFaces 0; setAttr " + $node + ".extractFaces 0;"); string $deleteCmd = ("setAttr " + $node + ".deleteFaces #1;"); string $extractCmd = ("setAttr " + $node + ".extractFaces #1;"); string $YZPlaneCmd = ("setAttr " + $node + ".cutPlaneRotate 0.0 90.0 0.0;"); string $ZXPlaneCmd = ("setAttr " + $node + ".cutPlaneRotate -90.0 0.0 0.0;"); string $XYPlaneCmd = ("setAttr " + $node + ".cutPlaneRotate 0.0 0.0 0.0;"); menuItem -label $simpleLabel -radialPosition "SE" -checkBox (!$deleteFaces && !$extractFaces) -command $simpleCmd ; menuItem -label $deleteFacesLabel -radialPosition "S" -checkBox ($deleteFaces) -command $deleteCmd ; menuItem -label $extractFacesLabel -radialPosition "SW" -checkBox ($extractFaces) -command $extractCmd ; menuItem -label $YZLabel -radialPosition "NE" -command $YZPlaneCmd ; menuItem -label $ZXLabel -radialPosition "N" -command $ZXPlaneCmd ; menuItem -label $XYLabel -radialPosition "NW" -command $XYPlaneCmd ; }