// =========================================================================== // 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: 2004 // // Procedure Name: AEfollicleRelated // // Description Name; // Return a list nodes related to the follicle that we want to // display tabs for when the follicle is in the AE. // For now the related nodes will be start, rest and output curves // as well as the input surface, hairSystem and pfxHair node // connected to it. // // Input Value: // nodeName: name of the follicle node that is in the editor, that // we are finding related nodes for. // // Output Value: // The list of related nodes, with the node whose tab we want to be // opened, with the follicle node added at the end of the // array. // global proc string[] AEfollicleRelated (string $node) { string $relatedNodes[]; int $i; string $start = sourceNodeNameFromConnection ( $node + ".startPosition" ); if( "" != $start ){ if( 0 == getAttr( $start + ".intermediateObject" ) ) { $relatedNodes[size($relatedNodes)] = $start; } } string $rest = sourceNodeNameFromConnection ( $node + ".restPosition" ); if( "" != $rest ){ if( 0 == getAttr( $rest + ".intermediateObject" ) ) { $relatedNodes[size($relatedNodes)] = $rest; } } string $hsys = destinationNodeNameFromConnection ( $node + ".outHair" ); if( "" != $hsys ){ $relatedNodes[size($relatedNodes)] = $hsys; } // We need to add the node twice to the end, because the // last entry is stripped out. int $index = size($relatedNodes); $relatedNodes[$index] = $node; $relatedNodes[$index+1] = $node; return $relatedNodes; }