// =========================================================================== // 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: // setMayaSoftwareLayers // // Description: // Setup the Maya renderer to render only the specified layers // and passes. // Empty strings means to ignore this option. // global proc setMayaSoftwareLayers(string $layers, string $passes) { int $i; int $j; int $state; string $allLayers[] = `listConnections renderLayerManager.renderLayerId`; // Treat the layers first if ($layers != "") { if ($layers == "off" || $layers == "false" || $layers == "0") { // Set the default layer to renderable, and all others to // non-renderable. // The subdirectory "defaultRenderLayer" will automatically // be created if any render layers (other than the default) exist. // for( $i=0 ; $i