// =========================================================================== // 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: Sep 25, 1997 // // Procedure Name: // turnOnAllRayTracing // // Description: // Simple MEL function to turn on/off all objects' reflection + // refraction. The "turnOn" parameter determines if we want to // turn on or off. // // global proc turnOnAllRayTracing (int $turnOn) { string $type; string $attr; string $allShapes[] = `ls -dag`; int $i; for ($i = 0; $i < size($allShapes); $i++) { $type = `objectType $allShapes[$i]`; switch ($type) { case "subdiv": case "nurbsSurface": case "mesh": case "polymesh": case "particle": $attr = $allShapes[$i] + ".visibleInReflections"; setAttr $attr $turnOn; $attr = $allShapes[$i] + ".visibleInRefractions"; setAttr $attr $turnOn; break; } } }