// =========================================================================== // 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: AEhairSystemRelated // // Description Name; // Return a list nodes related to the hairSystem that we want to // display tabs for when the hairSystem is in the AE. // For now the only related nodes will be the pfxHair node and, // where created, a diskCache node. // // Input Value: // nodeName: name of the hairSystem 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 hairSystem node added at the end of the // array. // global proc string[] AEhairSystemRelated (string $node) { string $relatedNodes[]; string $pfxHair = destinationNodeNameFromConnection ( $node + ".outputRenderHairs" ); if( "" != $pfxHair ) { $relatedNodes[size($relatedNodes)] = $pfxHair; } string $nTypes[] = { "hairSystem", "nucleus", "dynamicConstraint", "cacheFile","cacheBlend"}; string $nucNodes[] = getNucleusRelated( $node, $nTypes, $node, 1 ); for($nucNode in $nucNodes) { $relatedNodes[size($relatedNodes)] = $nucNode; } // Only one disk cache should be connected to this attribute. // string $connections[] = `listConnections ($node + ".diskCache")`; if(( size( $connections ) > 0 ) && ( nodeType( $connections[0] ) == "diskCache" )) { $relatedNodes[size($relatedNodes)] = $connections[0]; } $relatedNodes[size($relatedNodes)] = $node; $relatedNodes[size($relatedNodes)] = $node; return $relatedNodes; }