// =========================================================================== // 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. // =========================================================================== // // Create marking menu for both w-LMB and CTRL-SHIFT-RMB popup's // global proc translateMarkingMenuImpl() { int $mode = `manipMoveContext -q -mode Move`; // // Top level non-submenu // menuItem -label (uiRes("m_translateMarkingMenuImpl.kNormalAverage")) -command "manipMoveContext -edit -mode 10 Move" -checkBox ($mode == 10) -radialPosition "NE" -annotation (uiRes("m_translateMarkingMenuImpl.kSetMoveToNormalAverageModeAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kWorld")) -command "manipMoveContext -edit -mode 2 Move" -checkBox ($mode == 2 ? 1 : 0) -radialPosition "W" -annotation (uiRes("m_translateMarkingMenuImpl.kWorldSetMoveAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kObject")) -command "manipMoveContext -edit -mode 0 Move" -checkBox ($mode == 0 ? 1 : 0) -radialPosition "NW" -annotation (uiRes("m_translateMarkingMenuImpl.kSetMoveToObjectModeAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kKeepSpacing")) -command ("manipMoveContext -edit -snapComponentsRelative #1 Move" ) -checkBox `manipMoveContext -query -snapComponentsRelative Move` -radialPosition "SE" -annotation (uiRes("m_translateMarkingMenuImpl.kMaintainComponentAnnot")) ; // // Lower non-gestural menus // commonSelectionConstraintsOptionsPopup(); menuItem -divider true; menuItem -label (uiRes("m_translateMarkingMenuImpl.kSmartExtrude")) -command ("manipOptions -enableSmartExtrude #1") -checkBox `manipOptions -query -enableSmartExtrude`; menuItem -label (uiRes("m_translateMarkingMenuImpl.kSmartDuplicate")) -command ("manipOptions -enableSmartDuplicate #1") -checkBox `manipOptions -query -enableSmartDuplicate`; menuItem -divider true; menuItem -label (uiRes("m_translateMarkingMenuImpl.kPreserveUVs")) -command ("setTRSPreserveUVs #1") -checkBox `manipMoveContext -q -preserveUV Move` -annotation (uiRes("m_translateMarkingMenuImpl.kPreserveUVsAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kPreserveChild")) -command ("setTRSPreserveChildPosition #1") -checkBox `manipMoveContext -q -preserveChildPosition Move` -annotation (uiRes("m_translateMarkingMenuImpl.kPreserveChildAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kTweakMode")) -command ("strsTweakMode #1") -checkBox `manipMoveContext -q -tweakMode Move`; menuItem -label (uiRes("m_translateMarkingMenuImpl.kUpdateTriad")) -command ("manipMoveContext -edit -interactiveUpdate #1 Move;") -checkBox `manipMoveContext -query -interactiveUpdate Move` -annotation (uiRes("m_translateMarkingMenuImpl.kUpdateManipTriadAnnot")) ; menuItem -divider true; menuItem -label (uiRes("m_translateMarkingMenuImpl.kMoveOptions")) -command ("ToggleToolSettings") -annotation (getRunTimeCommandAnnotation ("MoveToolOptions")); // // North submenu // commonReflectionOptionsPopup(); // // South submenu // commonSelectOptionsPopup(); // // East submenu // menuItem -label (uiRes("m_translateMarkingMenuImpl.kSnapLabel")) -subMenu 1 -radialPosition "E"; menuItem -label (uiRes("m_translateMarkingMenuImpl.kDiscreteMoveLabel")) -radialPosition "E" -checkBox (`manipMoveContext -q -snap Move`) -command ("manipMoveContext -e -snap #1 Move"); menuItem -label (uiRes("m_translateMarkingMenuImpl.kVertexLabel")) -radialPosition "SE" -checkBox (`manipMoveContext -q -snapLivePoint Move`) -command ("manipMoveContext -e -snapLivePoint #1 Move"); menuItem -label (uiRes("m_translateMarkingMenuImpl.kRelativeMode")) -command ("manipMoveContext -edit -snapRelative #1 Move;") -checkBox `manipMoveContext -query -snapRelative Move` -annotation (uiRes("m_translateMarkingMenuImpl.kRelativeMoveModeSnappingAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kFaceCenterLabel")) -radialPosition "SW" -checkBox (`manipMoveContext -q -snapLiveFaceCenter Move`) -command ("manipMoveContext -e -snapLiveFaceCenter #1 Move"); setParent -m ..; // // South-West submenu // menuItem -radialPosition "SW" -label (uiRes("m_translateMarkingMenuImpl.kAxis")) -subMenu true -annotation (uiRes("m_translateMarkingMenuImpl.kAxisAnnot")) ; menuItem -rp "NW" -label (uiRes("m_translateMarkingMenuImpl.kNormal")) -command "manipMoveContext -edit -mode 3 Move" -checkBox ($mode == 3 ? 1 : 0) -annotation (uiRes("m_translateMarkingMenuImpl.kSetMoveToNormalModeAnnot")) ; menuItem -rp "W" -label (uiRes("m_translateMarkingMenuImpl.kLocal")) -command "manipMoveContext -edit -mode 1 Move" -checkBox ($mode == 1 ? 1 : 0) -annotation (uiRes("m_translateMarkingMenuImpl.kSetMoveToLocalModeAnnot")) ; menuItem -rp "NE" -label (uiRes("m_translateMarkingMenuImpl.kRotationAxis")) -command "manipMoveContext -edit -mode 4 Move" -checkBox ($mode == 4 ? 1 : 0) -annotation (uiRes("m_translateMarkingMenuImpl.kSetMoveManipulatorRotationAnnot")) ; menuItem -rp "N" -label (uiRes("m_translateMarkingMenuImpl.kLiveObjectAxis")) -command "manipMoveContext -edit -mode 5 Move" -checkBox ($mode == 5 ? 1 : 0) -annotation (uiRes("m_translateMarkingMenuImpl.kSetMoveManipulatorObjectAnnot")) ; // South-South-West submenu // menuItem -rp "SW" -label (uiRes("m_translateMarkingMenuImpl.kCustomAxis")) -subMenu true; menuItem -rp "E" -label (uiRes("m_translateMarkingMenuImpl.kCustomAxis")) -command "manipMoveContext -edit -mode 6 Move" -checkBox ($mode == 6 ? 1 : 0); menuItem -rp "W" -label (uiRes("m_translateMarkingMenuImpl.kOrientAxisToComponent")) -command "manipMoveOrient 4"; menuItem -rp "SW" -label (uiRes("m_translateMarkingMenuImpl.kOrientAxisTowardsPoint")) -command "manipMoveOrient 1"; menuItem -rp "S" -label (uiRes("m_translateMarkingMenuImpl.kAlignAxisWithEdge")) -command "manipMoveOrient 2"; menuItem -rp "SE" -label (uiRes("m_translateMarkingMenuImpl.kAlignAxisWithFace")) -command "manipMoveOrient 3"; menuItem -rp "N" -label (uiRes("m_translateMarkingMenuImpl.kAlignAxisWithObject")) -command "manipMoveOrient 5"; menuItem -rp "NW" -label (uiRes("m_translateMarkingMenuImpl.kOrientAxisReset")) -command "manipMoveOrient 0"; setParent -m ..; setParent -m ..; }