// =========================================================================== // 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. // =========================================================================== // // Procedure Name: // contextPolyToolsFaceMM // // Description: // This procedure creates the popup/marking menu // for poly face tools. See ModelEdMenu. // // Input Arguments: // None // // Return Value: // None. global proc contextPolyToolsFaceMM(){ int $mtkEnable = (`pluginInfo -q -loaded "modelingToolkit"`); menuItem -label (uiRes("m_contextPolyToolsFaceMM.kMergeFacesToCenter")) -command "MergeToCenter;" -radialPosition "N" ; setParent -menu ..; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kExtrudeFace")) -command "performPolyExtrude 0" -radialPosition "S" -enableCommandRepeat 1 -image "polyExtrudeFacet.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kExtrudeFaceOptions")) -command "performPolyExtrude 1" -optionBox 1 -radialPosition "S" -enableCommandRepeat 1 ; menuItem -version "2017" -label (uiRes("m_contextPolyToolsFaceMM.kWedgeFace")) -command "WedgePolygon" -radialPosition "SW" -enableCommandRepeat 1 -image "polyWedgeFace.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kWedgeFaceOptions")) -command "WedgePolygonOptions" -optionBox 1 -radialPosition "SW" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kPokeFace")) -command "PokePolygon" -radialPosition "NE" -enableCommandRepeat 1 -image "polyPoke.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kPokeFaceOptions")) -command "PokePolygonOptions" -optionBox 1 -radialPosition "NE" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kBevelFace")) -command "performPolyBevel 3" -radialPosition "E" -enableCommandRepeat 1 -image "polyBevel.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kBevelFaceOptions")) -command "BevelPolygonOptions" -optionBox 1 -radialPosition "E" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kFaceNormals")) -subMenu 1 -radialPosition "SE" -allowOptionBoxes 1 -postMenuCommandOnce 0 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kToggleFaceNormalDisplay")) -command "polyOptions -r -f -dn on" -radialPosition "S" -enableCommandRepeat 1 -image "commandButton.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kReversePropagate")) -command "polyNormal -normalMode 4 -ch 1" -radialPosition "NE" -enableCommandRepeat 1 -image "polyNormal.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kConformNormals")) -command "ConformPolygonNormals" -radialPosition "SE" -enableCommandRepeat 1 -image "polyNormalsConform.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kReverseNormals")) -command "ReversePolygonNormals" -radialPosition "E" -enableCommandRepeat 1 -image "polyNormal.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kReverseNormalsOptions")) -command "ReversePolygonNormalsOptions" -optionBox 1 -radialPosition "E" -enableCommandRepeat 1 ; setParent -menu ..; menuItem -version "2015" -label (uiRes("m_contextPolyToolsFaceMM.kMultiCutTool")) -command "dR_multiCutTool" -en $mtkEnable -radialPosition "W" -allowOptionBoxes 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kMultiCutToolOptions")) -command "dR_multiCutTool; toolPropertyWindow;" -optionBox 1 -radialPosition "W" -enableCommandRepeat 1 -enable $mtkEnable ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kPaintSelectFaces")) -command "ArtPaintSelectTool" -radialPosition "NW" -enableCommandRepeat 1 -image "artSelect.png" ; menuItem -divider 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kSmoothFaces")) -command "SmoothPolygon;" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kSmoothFacesOptions")) -command "SmoothPolygonOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kAssignInvisibleFaces")) -enableCommandRepeat true -annotation (getRunTimeCommandAnnotation("PolyAssignSubdivHoleOptions")) -image "polyAssignSubdivHole.png" -command "PolyAssignSubdivHole" ; menuItem -optionBox 1 -enableCommandRepeat false -annotation (getRunTimeCommandAnnotation("PolyAssignSubdivHoleOptions")) -image "polyAssignSubdivHole.png" -command "PolyAssignSubdivHoleOptions" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kAddDivisionsToFaces")) -command "SubdividePolygon" -enableCommandRepeat 1 -image "polySubdFacet.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kAddDivisionsOptions")) -command "SubdividePolygonOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -version 2018 -label (uiRes("m_contextPolyToolsFaceMM.kCircularize")) -command "PolyCircularize" -enableCommandRepeat 1 -image "polyCircularize.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kCircularizeOptions")) -command "PolyCircularizeOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kConnectComponents")) -annotation (getRunTimeCommandAnnotation("ConnectComponents")) -image "polyConnectComponents.png" -enableCommandRepeat 1 -command "ConnectComponents" ; menuItem -optionBox true -label (uiRes("m_contextPolyToolsFaceMM.kConnectComponentsOptions")) -annotation (getRunTimeCommandAnnotation("ConnectComponentsOptions")) -image "polyConnectComponents.png" -enableCommandRepeat 1 -command "ConnectComponentsOptions" ; menuItem -label (uiRes("m_contextPolyToolsEdgeMM.kDetach")) -annotation (getRunTimeCommandAnnotation("DetachComponent")) -image "polySplitVertex.png" -enableCommandRepeat 1 -command "DetachComponent" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kTriangulateFaces")) -command "Triangulate" -enableCommandRepeat 1 -image "polyTriangulate.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kQuadrangulateFaces")) -command "Quadrangulate" -enableCommandRepeat 1 -image "polyQuad.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kQuadrangulateFacesOptions")) -command "QuadrangulateOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kReduceFaces")) -command "ReducePolygon" -enableCommandRepeat 1 -image "polyReduce.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kReduceFacesOptions")) -command "ReducePolygonOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kBridgeFaces")) -command "BridgeEdge" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kBridgeFacesOptions")) -command "BridgeEdgeOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -divider 1 ; menuItem -annotation (getRunTimeCommandAnnotation("MirrorPolygonGeometry")) -label (uiRes("m_contextPolyToolsFaceMM.kMirrorPolygon")) -version "2017" -command ("MirrorPolygonGeometry") -image "polyMirrorGeometry.png" ; menuItem -optionBox true -annotation (getRunTimeCommandAnnotation("MirrorPolygonGeometryOptions")) -command "MirrorPolygonGeometryOptions" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kExtractFaces")) -command "ExtractFace" -enableCommandRepeat 1 -image "polyChipOff.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kExtractFacesOptions")) -command "ExtractFaceOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kDuplicateFace")) -command "DuplicateFace" -enableCommandRepeat 1 -image "polyDuplicateFacet.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kDuplicateFaceOptions")) -command "DuplicateFaceOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kTransformComponent")) -command "MovePolygonComponent;" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kTransformComponentOptions")) -command "MovePolygonComponentOptions" -optionBox 1 -enableCommandRepeat 1 ; menuItem -version 2015 -enable $mtkEnable -label (uiRes("m_contextPolyToolsFaceMM.kMTKConnectTool")) -annotation (uiRes("m_contextPolyToolsFaceMM.kMTKConnectToolAnn")) -command "dR_connectTool" MTKConnectToolMM; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kConnectToolOptions")) -command "dR_connectTool; toolPropertyWindow;" -optionBox 1 -enableCommandRepeat 1 -enable $mtkEnable ; menuItem -version 2015 -enable $mtkEnable -label (uiRes("m_contextPolyToolsFaceMM.kMTKTargetWeldTool")) -annotation (uiRes("m_contextPolyToolsFaceMM.kMTKTargetWeldToolAnn")) -command "dR_targetWeldTool" MTKTargetWeldToolMM; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kTargetWeldToolOptions")) -command "dR_targetWeldTool; toolPropertyWindow;" -optionBox 1 -enableCommandRepeat 1 -enable $mtkEnable ; menuItem -divider 1 ; contextPolyToolsMappingMM; menuItem -divider 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kPolygonDisplay")) -subMenu 1 -allowOptionBoxes 1 -postMenuCommandOnce 0 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kToggleBackfaceCulling")) -command "int $cond[1]=`polyOptions -q -fb`; if ($cond[0]) polyOptions -bc; else polyOptions -fb;" -enableCommandRepeat 1 ; menuItem -divider 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kToggleFaceCenters")) -command "TogglePolygonFaceCenters" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kToggleFaceNormals")) -command "polyOptions -r -f -dn on" -enableCommandRepeat 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kToggleFaceNumbers")) -command "polyOptions -activeObjects -r -din 0 0 1 0" -enableCommandRepeat 1 -image "menuIconDisplay.png" ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kToggleHiddenTriangles")) -command "polyOptions -r -dt 1" -enableCommandRepeat 1 ; menuItem -divider 1 ; menuItem -label (uiRes("m_contextPolyToolsFaceMM.kResetPolygonDisplay")) -command "polyOptions -activeObjects -ae -sb 3 -db 0 -dmb 0 -dv 0 -dn 0 -facet -dc 0 -dt 0 -dw 0 -din 0 0 0 0 -sn 0.4 -bc -duv 0 -uvt 0 -cs 0 -cm diffuse -bcv 1" -enableCommandRepeat 1 ; setParent -m ..; setParent -m ..; }