// =========================================================================== // 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. // =========================================================================== // Output Value: // The list of related nodes, with the node whose tab we want to be // opened, with the hairSystem node added at the end of the // array. // global proc string[] AEpfxHairRelated (string $node) { string $retval[]; // Make sure that the shape is first in the list so that $retval[0] = $node; // get the hair system string $hsys = sourceNodeNameFromConnection ( $node + ".renderHairs" ); if( "" != $hsys ){ $retval[size($retval)] = $hsys; } string $nTypes[] = { "hairSystem", "nucleus", "dynamicConstraint", "cacheFile","cacheBlend"}; string $nucNodes[] = getNucleusRelated( $hsys, $nTypes, $hsys, 1 ); for($nucNode in $nucNodes) { $retval[size($retval)] = $nucNode; } // Get the default tabs for this node string $relNodes[] = `defaultNavigation -ren -d $node`; string $preferredNode = `defaultNavigation -dwn -d $node`; for ($relNode in $relNodes) { $retval[size($retval)] = $relNode; } // if the hair system has a cache, show that too string $connections[] = `listConnections ($hsys + ".diskCache")`; if(( size( $connections ) > 0 ) && ( nodeType( $connections[0] ) == "diskCache" )) { $retval[size($retval)] = $connections[0]; } if ( $preferredNode != "" ) { $retval[size($retval)] = $preferredNode; } if( size( $retval ) == 0 ) { $retval[0] = $node; } return $retval; }