// =========================================================================== // 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: February 4, 1999 // // // Description: // // This is the interface for display smoothness, so that both // nurbs and subdivision surfaces smoothness can be changed // using the 1,2,3 keys. // // First, pass everything off to nurbs displaySmoothness // // If subdiv slice exists, // Gets a list of subdivs and passes them off to // subdivDisplaySmoothness // global proc int setDisplaySmoothness(int $smoothness) { // Get the select list. string $selList[] = `ls -sl`; int $len = size($selList) ; if ($len == 0) { $selList = `ls -hl`; $len = size($selList) ; } if ($len == 0) { return 0; } // // Set nurbs display smoothness // if ($smoothness == 1) { evalEcho("displaySmoothness -divisionsU 0 -divisionsV 0 -pointsWire 4 -pointsShaded 1 -polygonObject 1"); } else if ($smoothness == 2) { evalEcho("displaySmoothness -divisionsU 1 -divisionsV 1 -pointsWire 8 -pointsShaded 2 -polygonObject 2"); } else if ($smoothness == 3) { evalEcho("displaySmoothness -divisionsU 3 -divisionsV 3 -pointsWire 16 -pointsShaded 4 -polygonObject 3"); } else if ($smoothness == 0) { evalEcho("displaySmoothness -polygonObject 0"); } // // Set subdivision surfaces display smoothness // // if (`isTrue "SubdivUIExists"`) { eval("subdivDisplaySmoothness -smoothness " + $smoothness); // } return 1; }