// =========================================================================== // 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. // =========================================================================== // Description: This procedure is called to add new bins to // the hyper shade bin list. // global proc addBinsToHyperShadeBinList(string $newBins[]) { if (size($newBins) == 0) { // Nothing to add. // return; } string $binList = `getAttr defaultRenderGlobals.hyperShadeBinList`; string $binName; string $newBinList = $binList; for ($binName in $newBins) { if (!isValidBinName($binName)) { continue; } if (binNameExistsInHyperShadeBinList($binName)) { // This binName already exists in the bin list. // continue; } if ($binList == "") { $newBinList = $binName; } else { $newBinList += ";"+$binName; } } if ($newBinList != $binList) { setAttr defaultRenderGlobals.hyperShadeBinList -type "string" $newBinList; } }