// =========================================================================== // 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. // =========================================================================== // Procedure Name: // createMeshNode // // Description: // This procedure creates a meshNode. It also looks up the global // settings and sets the node's attributes appropriately. // global proc string createMeshNode() { int $ival=`optionVar -query polyCreateMeshesSingleSided`; if ($ival) { $ival = 0; } else { $ival = 1; } string $mesh = `createNode mesh`; setAttr ( $mesh + ".doubleSided" ) $ival; setAttr ($mesh + ".tangentSpace" ) `optionVar -query polyDefaultTangentSpace`; string $tsaDegrees = `optionVar -query polyDefaultTangentSmoothingAngle`; float $tsa = `convertUnit -fromUnit "deg" $tsaDegrees`; setAttr ($mesh + ".tangentSmoothingAngle" ) $tsa; return $mesh; }