// =========================================================================== // 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 Set Display Quality Marking Menu. // global proc buildQualityDisplayMM() // // Creates a marking menu that allows the user // to select Polygon 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 int $currentDisplayQuality = 0; // Initially set to Low global string $MMcmd = ""; $MMcmd = ""; popupMenu -mm 1 -b 1 -aob 1 -p `findPanelPopupParent` tempMM; menuItem -rp "S" -label (uiRes("m_buildQualityDisplayMM.kLowQualityDisplay")) -c "$MMcmd = \"low\""; menuItem -rp "E" -label (uiRes("m_buildQualityDisplayMM.kMediumQualityDisplay")) -c "$MMcmd = \"medium\""; menuItem -rp "N" -label (uiRes("m_buildQualityDisplayMM.kHighQualityDisplay")) -c "$MMcmd = \"high\""; setParent -m ..; } global proc buildQualityDisplayMM_release() { global int $currentDisplayQuality; global string $MMcmd; if ($MMcmd == "") { if ( $currentDisplayQuality == 0 ) { // // Upgrade to Medium quality display $currentDisplayQuality = 1; displaySmoothness -du 1 -dv 1 -pw 8 -ps 2 -po 2; if (`isTrue "SubdivUIExists"`) { subdivDisplaySmoothness -smoothness 2; } } else if ($currentDisplayQuality == 1 ) { // // Upgrade to High quality display $currentDisplayQuality = 2; displaySmoothness -du 2 -dv 2 -pw 16 -ps 4 -po 3; if (`isTrue "SubdivUIExists"`) { subdivDisplaySmoothness -smoothness 3; } } else { // // Loop back to Low quality display $currentDisplayQuality = 0; displaySmoothness -du 0 -dv 0 -pw 4 -ps 1 -po 1; if (`isTrue "SubdivUIExists"`) { subdivDisplaySmoothness -smoothness 1; } } } else { // Process Marking menu selection switch ($MMcmd) { case "low" : displaySmoothness -du 0 -dv 0 -pw 4 -ps 1 -po 1; if (`isTrue "SubdivUIExists"`) { subdivDisplaySmoothness -smoothness 1; } $currentDisplayQuality = 0; break; case "medium" : displaySmoothness -du 1 -dv 1 -pw 8 -ps 2 -po 2; if (`isTrue "SubdivUIExists"`) { subdivDisplaySmoothness -smoothness 2; } $currentDisplayQuality = 1; break; case "high" : displaySmoothness -du 2 -dv 2 -pw 16 -ps 4 -po 3; if (`isTrue "SubdivUIExists"`) { subdivDisplaySmoothness -smoothness 3; } $currentDisplayQuality = 2; break; } } if( `popupMenu -exists tempMM` ) { deleteUI tempMM; } }