// =========================================================================== // 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. // =========================================================================== global proc int blendShapeTargetIsVisible(string $bsdName, int $targetIndex) // // Description: // Check if given blend shape target is visible. // // Return Value: // Return 1 if visible; otherwise return 0; // { //Check if BSD is invisible if (!blendShapeIsVisible($bsdName)) return 0; //Continue check if target is invisible $attr = $bsdName + ".targetVisibility[" + $targetIndex + "]"; if (!`getAttr $attr`) return 0; //Continue check if target parent is invisible $attr = $bsdName + ".targetParentVisibility[" + $targetIndex + "]"; return `getAttr $attr`; }