// Copyright (C) 1997-2014 Autodesk, Inc., and/or its licensors. // All rights reserved. // // The coded instructions, statements, computer programs, and/or related // material (collectively the "Data") in these files contain unpublished // information proprietary to Autodesk, Inc. ("Autodesk") and/or its licensors, // which is protected by U.S. and Canadian federal copyright law and by // international treaties. // // The Data is provided for use exclusively by You. You have the right to use, // modify, and incorporate this Data into other products for purposes authorized // by the Autodesk software license agreement, without fee. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. AUTODESK // DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTIES // INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF NON-INFRINGEMENT, // MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE // OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT WILL AUTODESK AND/OR ITS // LICENSORS BE LIABLE FOR ANY LOST REVENUES, DATA, OR PROFITS, OR SPECIAL, // DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS // LICENSORS HAS BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES. global proc PolygonsMeshMenu(string $parent) // // Description: // Polygon Mesh menu // { if (! `isTrue "PolygonsExists"`) return; setParent -menu $parent; if (`menu -query -numberOfItems $parent` == 0) { menuItem -divider true -dividerLabel (uiRes("m_PolygonsMeshMenu.kCombineDivider")); menuItem -label (uiRes("m_PolygonsMeshMenu.kPolyBuildBooleans")) -version "2014" -subMenu 1 -allowOptionBoxes true -tearOff 1 ; menuItem -label (uiRes("m_PolygonsMeshMenu.kPolyBuildUnion")) -enableCommandRepeat true -image "polyBooleansUnion.png" -annotation (uiRes("m_PolygonsMeshMenu.kPolyBuildUnionAnnot")) -dragMenuCommand "polygonsMenuItemToShelf \"PolygonBooleanUnion\"" -command "PolygonBooleanUnion" ; menuItem -optionBox true -ecr false -image "polyBooleansUnion.png" -annotation (uiRes("m_PolygonsMeshMenu.kPolyUnionOptionsAnnot")) -c "PolygonBooleanUnionOptions" menuItemUnionOptions ; menuItem -label (uiRes("m_PolygonsMeshMenu.kPolyBuildDifference")) -enableCommandRepeat true -image "polyBooleansDifference.png" -annotation (uiRes("m_PolygonsMeshMenu.kPolyBuildDifferenceAnnot")) -dragMenuCommand "polygonsMenuItemToShelf \"PolygonBooleanDifference\"" -command "PolygonBooleanDifference" ; menuItem -optionBox true -ecr false -image "polyBooleansDifference.png" -annotation (uiRes("m_PolygonsMeshMenu.kPolyDifferenceOptionsAnnot")) -c "PolygonBooleanDifferenceOptions" menuItemDifferenceOptions ; menuItem -label (uiRes("m_PolygonsMeshMenu.kPolyBuildIntersection")) -enableCommandRepeat true -image "polyBooleansIntersection.png" -annotation (uiRes("m_PolygonsMeshMenu.kPolyBuildIntersectionAnnot")) -dragMenuCommand "polygonsMenuItemToShelf \"PolygonBooleanIntersection\"" -command "PolygonBooleanIntersection" ; menuItem -optionBox true -ecr false -image "polyBooleansIntersection.png" -annotation (uiRes("m_PolygonsMeshMenu.kPolyIntersectionOptionsAnnot")) -c "PolygonBooleanIntersectionOptions" menuItemIntersectionOptions ; setParent -menu ..; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyCombine")) -enableCommandRepeat true -image "polyUnite.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyCombineAnnot")) -dmc "polygonsMenuItemToShelf \"polyPerformAction polyUnite o 0\"" -command "CombinePolygons" ; menuItem -optionBox true -annotation (getRunTimeCommandAnnotation("CombinePolygonsOptions")) -image "polyUnite.png" -command "CombinePolygonsOptions" ; menuItem -divider true -dividerLabel (uiRes("m_PolygonsMeshMenu.kSeparateDivider")); menuItem -label (uiRes("m_PolygonsMeshMenu.kNewExtract")) -annotation (getRunTimeCommandAnnotation("ExtractFace")) -image "polyChipOff.png" -command "ExtractFace" -dragMenuCommand "performPolyChipOff 2 0" -dragDoubleClickCommand "ExtractFaceOptions" ; menuItem -optionBox true -annotation (getRunTimeCommandAnnotation("ExtractFaceOptions")) -image "polyChipOff.png" -command "ExtractFaceOptions" ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolySeparate")) -annotation (getRunTimeCommandAnnotation("SeparatePolygon")) -image "polySeparate.png" -command "SeparatePolygon" ; menuItem -divider true -dividerLabel (uiRes("m_PolygonsMeshMenu.kShapeDivider")); menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyAvgVts")) -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyAvgVtsAnnot")) -command "performPolyAverageVertex 0" -i "polyAverageVertex.png" ; menuItem -optionBox true -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyAvgVtsOptionsAnnot")) -command "performPolyAverageVertex 1" -enableCommandRepeat false -image "polyAverageVertex.png" ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewFillHole")) -annotation (getRunTimeCommandAnnotation("FillHole")) -image "polyCloseBorder.png" -command "FillHole" ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyQuadrangulate")) -enableCommandRepeat true -image "polyQuad.png" -dragDoubleClickCommand "performPolyQuadrangulate 1" -dragMenuCommand "performPolyQuadrangulate 2" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyQuadrangulateAnnot")) -command "Quadrangulate" quadrangulateItem ; menuItem -optionBox true -image "polyQuad.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyQuadrangulateOptionsAnnot")) -enableCommandRepeat false -command "QuadrangulateOptions" quadrangulateOptionItem; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolySmooth")) -enableCommandRepeat true -image "polySmooth.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolySmoothAnnot")) -dragDoubleClickCommand "performPolySmooth 1" -dragMenuCommand "performPolySmooth 2" -c "SmoothPolygon" ; menuItem -optionBox true -image "polySmooth.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolySmoothOptionsAnnot")) -ecr false -c "SmoothPolygonOptions" ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyTriangulate")) -enableCommandRepeat true -image "polyTriangulate.png" -dragMenuCommand "polygonsMenuItemToShelf \"polyPerformAction polyTriangulate f 0\"" -command "Triangulate" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyTriangulateAnnot")) triangulateItem ; menuItem -divider true -dividerLabel (uiRes("m_PolygonsMeshMenu.kMirrorDivider")); menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyMirrorCut")) -image "polyMirrorCut.png" -enableCommandRepeat true -dragMenuCommand "performPolyMirrorCut 2" -dragDoubleClickCommand "performPolyMirrorCut 1" -command "MirrorCutPolygonGeometry" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyMirrorCutAnnot")) mirrorCutItem ; menuItem -optionBox true -enableCommandRepeat false -image "polyMirrorCut.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyMirrorCutOptionsAnnot")) -command "MirrorCutPolygonGeometryOptions" mirrorCutOptionItem ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyMirrorGeom")) -image "polyMirrorGeometry.png" -enableCommandRepeat true -dragMenuCommand "performPolyMirror 2" -dragDoubleClickCommand "performPolyMirror 1" -command "MirrorPolygonGeometry" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyMirrorGeomAnnot")) mirrorItem ; menuItem -optionBox true -enableCommandRepeat false -image "polyMirrorGeometry.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyMirrorGeomOptionsAnnot")) -command "MirrorPolygonGeometryOptions" mirrorOptionItem ; menuItem -divider true -dividerLabel (uiRes("m_PolygonsMeshMenu.kTransferDivider")); menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyClipBoardMenu")) -subMenu 1 -tearOff 1 -allowOptionBoxes true ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewCopy")) -annotation (getRunTimeCommandAnnotation("PolygonCopy")) -image "polyCopyColors.png" -command "PolygonCopy" -dragMenuCommand "performPolyCopyPaste 2 1" -dragDoubleClickCommand "PolygonCopyOptions" ; menuItem -optionBox true -imageOverlayLabel (uiRes("m_PolygonsMeshMenu.kCopyOptionsOverlayLabel")) -annotation (getRunTimeCommandAnnotation("PolygonCopyOptions")) -image "polyCopyColors.png" -command "PolygonCopyOptions" ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPaste")) -annotation (getRunTimeCommandAnnotation("PolygonPaste")) -image "polyPasteColors.png" -command "PolygonPaste" -dragMenuCommand "performPolyCopyPaste 2 2" -dragDoubleClickCommand "PolygonPasteOptions" ; menuItem -optionBox true -annotation (getRunTimeCommandAnnotation("PolygonPasteOptions")) -image "polyPasteColors.png" -command "PolygonPasteOptions" ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewClearClipboard")) -annotation (getRunTimeCommandAnnotation("PolygonClearClipboard")) -image "polyClearColors.png" -command "PolygonClearClipboard" -dragMenuCommand "performPolyCopyPaste 2 3" -dragDoubleClickCommand "PolygonClearClipboardOptions" ; menuItem -optionBox true -imageOverlayLabel (uiRes("m_PolygonsMeshMenu.kClearClipboardOptionsOverlayLabel")) -image "polyClearColors.png" -annotation (getRunTimeCommandAnnotation("PolygonClearClipboardOptions")) -command "PolygonClearClipboardOptions" ; setParent -m ..; menuItem -label (uiRes("m_PolygonsMeshMenu.kTransferAttributes")) -annotation (uiRes("m_PolygonsMeshMenu.kTransferAttributesAnnot")) -image "polyTransferAttributes.png" -command "performTransferAttributes 0" transferAttributesItem ; menuItem -optionBox true -annotation (uiRes("m_PolygonsMeshMenu.kTransferAttributesOptions")) -image "polyTransferAttributes.png" -command "performTransferAttributes 1" transferAttributesItemOption ; menuItem -label (uiRes("m_PolygonsMeshMenu.kTransferShadingSets")) -annotation (uiRes("m_PolygonsMeshMenu.kTransferShadingSetsAnnot")) -image "polyTransferShadingSets.png" -command "performTransferShadingSets 0" transferShadingSetsItem ; menuItem -optionBox true -annotation (uiRes("m_PolygonsMeshMenu.kTransferShadingSetsOptions")) -image "polyTransferShadingSets.png" -command "performTransferShadingSets 1" transferShadingSetsItemOption ; menuItem -divider true -dividerLabel (uiRes("m_PolygonsMeshMenu.kOptimizeDivider")); menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyCleanup")) -enableCommandRepeat true -image "polyCleanup.png" -dragMenuCommand "performPolyCleanup 2" -dragDoubleClickCommand "performPolyCleanup 1" -command "CleanupPolygonOptions" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyCleanupAnnot")) cleanupItem ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewPolyReduce")) -version "2014" -enableCommandRepeat true -image "polyReduce.png" -dragMenuCommand "performPolyReduce 2" -dragDoubleClickCommand "performPolyReduce 1" -command "ReducePolygon" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyReduceAnnot")) reductionItem ; menuItem -optionBox true -image "polyReduce.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewPolyReduceOptionsAnnot")) -enableCommandRepeat false -command "ReducePolygonOptions" reductionOptionItem ; setParent -m ..; menuItem -divider true; menuItem -label (uiRes("m_PolygonsMeshMenu.kProxyMenu")) -subMenu 1 -tearOff 1 -allowOptionBoxes true ; menuItem -label (uiRes("m_PolygonsMeshMenu.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"; menuItem -label (uiRes("m_PolygonsMeshMenu.kRemoveSubdivProxyMirror")) -ecr true -image "polyUnmirrorSmoothProxy.png" -annotation `runTimeCommand -q -ann UnmirrorSmoothProxy` -dragDoubleClickCommand "performUnmirrorSmoothProxy 1" -dragMenuCommand "performUnmirrorSmoothProxy 0" -command "UnmirrorSmoothProxy"; menuItem -optionBox 1 -i "polyUnmirrorSmoothProxy.png" -annotation (uiRes("m_PolygonsMeshMenu.kRemoveSubdivProxyMirrorOptionsAnnot")) -ecr false -c "UnmirrorSmoothProxyOptions"; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewCreasePolyTool")) -ecr true -i "polyCrease.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewCreasePolyToolAnnot")) -c "PolyCreaseTool" -dmc "PolyCreaseTool" -ddc "PolyCreaseToolOptions"; menuItem -optionBox 1 -ecr false -i "polyCrease.png" -annotation (uiRes("m_PolygonsMeshMenu.kNewCreasePolyToolOptionsAnnot")) -c "PolyCreaseToolOptions"; menuItem -divider true; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewTogProxyDisplay")) -annotation (uiRes("m_PolygonsMeshMenu.kNewTogSmoothDisplayAnnot")) -image "polyToggleProxy.png" -command "SmoothingDisplayToggle" ; menuItem -label (uiRes("m_PolygonsMeshMenu.kNewBothProxySubdivDisplay")) -annotation (uiRes("m_PolygonsMeshMenu.kNewBothProxySubdivDisplayAnnot")) -image "polyToggleProxySubdiv.png" -command "SmoothingDisplayShowBoth" ; setParent -menu ..; setParent -menu ..; } }