// =========================================================================== // 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: November 12, 1998 // // // Procedure Name: // setFilter // // Description: // This is a filter which manages which sets are to be displayed // within the outliner // // Input Arguments: // None. // // Return Value: // None. // global proc int setFilterScript (string $name) // // Procedure Name: // setFilterScript // // Description: // itemFilter script filter for sets to display in the outliner // // Input Arguments: // string $name The object to filter // // Return Value: // int true if the object passes, false if it fails // { // We first test for plug-in object sets. string $apiNodeType; if ( catch( $apiNodeType = `nodeType -api $name` ) ) { return( false ); } if ( $apiNodeType == "kPluginObjectSet" ) { return( true ); } // We do not need to test is the object is a set, since that test // has already been done by the outliner // string $nodeType; if (catch ($nodeType = `nodeType $name`)) { return (false); } // We do not want any rendering sets // if ($nodeType == "shadingEngine") { return (false); } // MAYA-16604 FIX ME // Why are these different node type tests // needed to stop AnimLayers appearing? // if the object is not a set, return false if ( !( ($nodeType == "objectSet") || ($nodeType == "textureBakeSet") || ($nodeType == "vertexBakeSet") || ($nodeType == "creaseSet") || ($nodeType == "character") ) ) { return (false); } // We also do not want any sets with restrictions // if (`getAttr ($name + ".verticesOnlySet")`) { return (false); } if (`getAttr ($name + ".edgesOnlySet")`) { return (false); } if (`getAttr ($name + ".facetsOnlySet")`) { return (false); } if (`getAttr ($name + ".editPointsOnlySet")`) { return (false); } if (`getAttr ($name + ".renderableOnlySet")`) { return (false); } // Do not show layers // if (`getAttr ($name + ".isLayer")`) { return (false); } string $annotation = `getAttr ($name + ".annotation")`; // Do not show bookmarks // if ($annotation == "bookmarkAnimCurves") { return (false); } // Whew ... we can finally show it // return (true); }