// =========================================================================== // 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: shouldAppearInNodeCreateUI makes a check based on node type $type and certain environment variables, and returns a boolean value. Returns true if a node is not in the list of types to be excluded, or if the variable MAYA_EXPOSE_FACADE_NODES is set. Returns false otherwise. Currently the facade types as follows: - materialFacade - envFacade - AISEnvFacade */ global int $gExposeFacadeNodes; $gExposeFacadeNodes = `getenv("MAYA_EXPOSE_FACADE_NODES")` != ""; global proc int shouldAppearInNodeCreateUI(string $type) { global int $gExposeFacadeNodes; return ($gExposeFacadeNodes || (($type!="materialFacade") && ($type!="AISEnvFacade") && ($type!="adskMaterial") && ($type!="renderedImageSource") && ($type!="envFacade"))) && `getClassification -satisfies "hidden" $type` != 1; }