// =========================================================================== // 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. // =========================================================================== // // // Creation Date: 17 June 1997 // // // Description: // This implements the Selection Component Mask Marking Menu. // global proc doSelectComponentMM() { // Points // int $maskResult = ( `selectType -q -cv` + `selectType -q -polymeshVertex` + `selectType -q -subdivMeshPoint` + `selectType -q -latticePoint` + `selectType -q -particle` ); // Why can't submenu label have check-boxes??? // menuItem -rp "N" -label (uiRes("m_buildSelectComponentMM.kPoints")) -subMenu true; menuItem -rp "N" -label (uiRes("m_buildSelectComponentMM.kAllPoints")) -cb $maskResult -c "setComponentPickMask \"Point\" #1"; menuItem -rp "E" -label (uiRes("m_buildSelectComponentMM.kCVs")) -cb `selectType -q -cv` -c "selectType -cv #1"; menuItem -rp "SE" -label (uiRes("m_buildSelectComponentMM.kPolyVertices")) -cb `selectType -q -polymeshVertex` -c "selectType -polymeshVertex #1"; menuItem -rp "S" -label (uiRes("m_buildSelectComponentMM.kLatticePoints")) -cb `selectType -q -latticePoint` -c "selectType -latticePoint #1"; menuItem -rp "W" -label (uiRes("m_buildSelectComponentMM.kParticles")) -cb `selectType -q -particle` -c "selectType -particle #1"; menuItem -rp "SW" -label (uiRes("m_buildSelectComponentMM.kSubdivMeshPoints")) -cb `selectType -q -subdivMeshPoint` -c "selectType -subdivMeshPoint #1"; setParent -m ..; // Parm Points // menuItem -rp "NE" -label (uiRes("m_buildSelectComponentMM.kParmPoints")) -subMenu true; menuItem -rp "NE" -label (uiRes("m_buildSelectComponentMM.kAllParmPoints")) -cb (`selectType -q -editPoint` + `selectType -q -curveParameterPoint` + `selectType -q -surfaceParameterPoint` ) -c "setComponentPickMask \"ParmPoint\" #1"; menuItem -rp "E" -label (uiRes("m_buildSelectComponentMM.kEditPoints")) -cb `selectType -q -editPoint` -c "selectType -editPoint #1"; menuItem -rp "S" -label (uiRes("m_buildSelectComponentMM.kCurvePoints")) -cb `selectType -q -cpp` -c "selectType -cpp #1"; menuItem -rp "W" -label (uiRes("m_buildSelectComponentMM.kSurfacePoints")) -cb `selectType -q -spp` -c "selectType -spp #1"; menuItem -rp "SW" -label (uiRes("m_buildSelectComponentMM.kSubdivMeshUVs")) -cb `selectType -q -smu` -c "selectType -smu #1"; setParent -m ..; // Lines // menuItem -rp "E" -label (uiRes("m_buildSelectComponentMM.kLines")) -subMenu true; menuItem -rp "E" -label (uiRes("m_buildSelectComponentMM.kAllLines")) -cb (`selectType -q -polymeshEdge` + `selectType -q -isoparm` + `selectType -q -surfaceEdge` ) -c "setComponentPickMask \"Line\" #1"; menuItem -rp "S" -label (uiRes("m_buildSelectComponentMM.kPolyEdges")) -cb `selectType -q -polymeshEdge` -c "selectType -polymeshEdge #1"; menuItem -rp "W" -label (uiRes("m_buildSelectComponentMM.kIsoparms")) -cb `selectType -q -isoparm` -c "selectType -isoparm #1"; menuItem -rp "N" -label (uiRes("m_buildSelectComponentMM.kTrimEdges")) -cb `selectType -q -surfaceEdge` -c "selectType -surfaceEdge #1"; menuItem -rp "SE" -label (uiRes("m_buildSelectComponentMM.kSprings")) -cb `selectType -q -springComponent` -c "selectType -springComponent #1"; setParent -m ..; // Faces // menuItem -rp "SE" -label (uiRes("m_buildSelectComponentMM.kFaces")) -cb (`selectType -q -facet` + `selectType -q -surfaceFace`) -c "selectType -facet #1; selectType -surfaceFace #1"; // Hulls // menuItem -rp "S" -label (uiRes("m_buildSelectComponentMM.kHulls")) -cb `selectType -q -hull` -c "selectType -hull #1"; // Pivots // menuItem -rp "SW" -label (uiRes("m_buildSelectComponentMM.kPivots")) -subMenu true; menuItem -rp "SW" -label (uiRes("m_buildSelectComponentMM.kAllPivots")) -cb (`selectType -q -rotatePivot` + `selectType -q -scalePivot` + `selectType -q -jointPivot` ) -c "setComponentPickMask \"Pivot\" #1"; menuItem -rp "NW" -label (uiRes("m_buildSelectComponentMM.kRotatePivots")) -cb `selectType -q -rotatePivot` -c "selectType -rotatePivot #1"; menuItem -rp "NE" -label (uiRes("m_buildSelectComponentMM.kScalePivots")) -cb `selectType -q -scalePivot` -c "selectType -scalePivot #1"; menuItem -rp "SE" -label (uiRes("m_buildSelectComponentMM.kJointPivots")) -cb `selectType -q -jointPivot` -c "selectType -jointPivot #1"; setParent -m ..; // Handles // menuItem -rp "W" -label (uiRes("m_buildSelectComponentMM.kHandles")) -cb `selectType -q -selectHandle` -c "selectType -selectHandle #1"; // Misc // menuItem -rp "NW" -label (uiRes("m_buildSelectComponentMM.kMisc")) -subMenu true; menuItem -rp "NW" -label (uiRes("m_buildSelectComponentMM.kAllMisc")) -cb (`selectType -q -imagePlane` + `selectType -q -localRotationAxis` ) -c "setComponentPickMask \"Other\" #1"; menuItem -rp "E" -label (uiRes("m_buildSelectComponentMM.kLocalRotationAxes")) -cb `selectType -q -localRotationAxis` -c "selectType -localRotationAxis #1"; menuItem -rp "S" -label (uiRes("m_buildSelectComponentMM.kImagePlanes")) -cb `selectType -q -imagePlane` -c "selectType -imagePlane #1"; setParent -m ..; // Overflow // if (!`menuItem -exists selCompMMOvflItem1`) { // Only build overflow items if not already built. This // allows for multiple postings on a single hotkey hold. menuItem -label (uiRes("m_buildSelectComponentMM.kAllComponentsOn")) -c "setComponentPickMask \"All\" 1" selCompMMOvflItem1; menuItem -label (uiRes("m_buildSelectComponentMM.kAllComponentsOff")) -c "setComponentPickMask \"All\" 0" selCompMMOvflItem2; // menuItem -label _L10N( kToggleAllComponents, "Toggle All Components" ) -enable false; menuItem -d true selCompMMOvflItem3; menuItem -label (uiRes("m_buildSelectComponentMM.kSaveToShelf")) -c "saveComponentMaskToShelf" selCompMMOvflItem4; menuItem -d true selCompMMOvflItem5; menuItem -label (uiRes("m_buildSelectComponentMM.kSelectObjects")) -c "selectMode -object" selCompMMOvflItem6; } setParent -m ..; } global proc buildSelectComponentMM() // // Creates a marking menu that allows the user // to select Component masks. It reuses // the name tempMM for the name of the menu, to // ensure that there's only one of these at // any one time. { if( `popupMenu -exists tempMM` ) { deleteUI tempMM; } global string $gSelect; setToolTo $gSelect; selectMode -component; popupMenu -sh 1 -mm 1 -b 1 -aob 1 -p `findPanelPopupParent` -pmc "doSelectComponentMM" tempMM; }