// =========================================================================== // 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 rotateMarkingMenuImpl() { int $mode = `manipRotateContext -q -mode Rotate`; // // Top level non-submenu // menuItem -radialPosition "NW" -label (uiRes("m_rotateMarkingMenuImpl.kLocalLabel")) -checkBox ($mode == 0 ? 1 : 0) -command ("manipRotateContext -e -mode 0 Rotate"); menuItem -radialPosition "W" -label (uiRes("m_rotateMarkingMenuImpl.kWorldLabel")) -checkBox ($mode == 1 ? 1 : 0) -command ("manipRotateContext -e -mode 1 Rotate"); menuItem -version "2015" -label (uiRes("m_translateMarkingMenuImpl.kCustomAxis")) -subMenu 1 -radialPosition "SW"; menuItem -radialPosition "E" -label (uiRes("m_translateMarkingMenuImpl.kCustomAxis")) -command ("manipRotateContext -e -mode 3 Rotate") -checkBox ($mode == 3 ? 1 : 0); menuItem -rp "W" -label (uiRes("m_translateMarkingMenuImpl.kOrientAxisToComponent")) -command "manipRotateOrient 4"; menuItem -rp "SW" -label (uiRes("m_translateMarkingMenuImpl.kOrientAxisTowardsPoint")) -command "manipRotateOrient 1"; menuItem -rp "S" -label (uiRes("m_translateMarkingMenuImpl.kAlignAxisWithEdge")) -command "manipRotateOrient 2"; menuItem -rp "SE" -label (uiRes("m_translateMarkingMenuImpl.kAlignAxisWithFace")) -command "manipRotateOrient 3"; menuItem -rp "N" -label (uiRes("m_translateMarkingMenuImpl.kAlignAxisWithObject")) -command "manipRotateOrient 5"; menuItem -rp "NW" -label (uiRes("m_translateMarkingMenuImpl.kOrientAxisReset")) -command "manipRotateOrient 0"; setParent -m ..; menuItem -radialPosition "SE" -label (uiRes("m_rotateMarkingMenuImpl.kDiscreteRotate")) -checkBox (`manipRotateContext -q -snap Rotate`) -command ("manipRotateContext -e -snap #1 Rotate"); menuItem -radialPosition "NE" -label (uiRes("m_rotateMarkingMenuImpl.kNormalAverageRotate")) -command ("manipRotateContext -e -mode 10 Rotate") -checkBox ($mode == 10) ; menuItem -radialPosition "E" -label (uiRes("m_rotateMarkingMenuImpl.kGimbalLabel")) -checkBox ($mode == 2 ? 1 : 0) -command ("manipRotateContext -e -mode 2 Rotate"); // // North submenu // commonReflectionOptionsPopup(); // // South submenu // commonSelectOptionsPopup(); // // Lower non-gestural menus // commonSelectionConstraintsOptionsPopup(); menuItem -divider true; menuItem -label (uiRes("m_rotateMarkingMenuImpl.kSmartExtrude")) -command ("manipOptions -enableSmartExtrude #1") -checkBox `manipOptions -query -enableSmartExtrude`; menuItem -label (uiRes("m_rotateMarkingMenuImpl.kSmartDuplicate")) -command ("manipOptions -enableSmartDuplicate #1") -checkBox `manipOptions -query -enableSmartDuplicate`; menuItem -divider true; menuItem -label (uiRes("m_rotateMarkingMenuImpl.kUseObjectPivotLabel")) -checkBox (`manipRotateContext -q -useObjectPivot Rotate` && !`manipRotateContext -q -useManipPivot Rotate`) -command ("manipRotateContext -e -useObjectPivot #1 -useManipPivot 0 Rotate"); menuItem -label (uiRes("m_rotateMarkingMenuImpl.kCenterTrackballLabel")) -checkBox (`manipRotateContext -q -centerTrackball Rotate`) -command ("manipRotateContext -e -centerTrackball #1 Rotate"); menuItem -label (uiRes("m_rotateMarkingMenuImpl.kPreserveUVs")) -command ("setTRSPreserveUVs #1") -checkBox `manipRotateContext -q -preserveUV Rotate` -annotation (uiRes("m_rotateMarkingMenuImpl.kPreserveUVsAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kPreserveChild")) -command ("setTRSPreserveChildPosition #1") -checkBox `manipRotateContext -q -preserveChildPosition Rotate` -annotation (uiRes("m_translateMarkingMenuImpl.kPreserveChildAnnot")) ; menuItem -label (uiRes("m_translateMarkingMenuImpl.kTweakMode")) -command ("strsTweakMode #1") -checkBox `manipRotateContext -q -tweakMode Rotate`; menuItem -label (uiRes("m_rotateMarkingMenuImpl.kRelativeLabel")) -command ("manipRotateContext -e -snapRelative #1 Rotate") -checkBox (`manipRotateContext -q -snapRelative Rotate`); menuItem -divider true; menuItem -label (uiRes("m_rotateMarkingMenuImpl.kRotateOptions")) -command ("ToggleToolSettings") -annotation (uiRes("m_rotateMarkingMenuImpl.kRotateToolOptionsAnnot")) ; }