// =========================================================================== // 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: 2003 // // Description: // This warn the user if any follicle output curves are selected, as these // curves should generally not be edited. // // global proc int warnIfOutputCurvesSelected( int $isError ){ string $curves[] = `ls -sl -o -dag -type nurbsCurve`; for( $i = 0; $i < size( $curves ); $i++ ){ string $curve = $curves[$i]; string $create[] = `listConnections -sh 1 ($curve + ".create")`; for( $j = 0; $j < size( $create); $j++ ){ string $nType = `nodeType $create[$j]`; if( $nType == "follicle"){ if( $isError ){ string $msg = (uiRes("m_warnIfOutputCurvesSelected.kOutputCurveError")); error( $msg ); } else { string $msg = (uiRes("m_warnIfOutputCurvesSelected.kOutputCurveWarning")); warning( $msg ); } return true; } } } return false; }