// =========================================================================== // 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: 98 // // // Description: // This lists related curves to all strokes // global proc string[] listAllStrokeCurves( int $listControls ) { string $strokes[] = `listTransforms "-type stroke"`; string $list[]; int $i; int $listIndex = 0; for( $i = 0; $i < size( $strokes ); $i++ ) { string $strokeCurves[]; if( $listControls ) $strokeCurves = `listConnections ($strokes[$i]+".controlCurve")`; else $strokeCurves = `listConnections ($strokes[$i]+".pathCurve")`; for($j = 0; $j < size( $strokeCurves ); $j++ ) { if( nodeType( $strokeCurves[$j] ) == "curveFromSurfaceCoS" ) { string $cos[] = `listConnections ($strokeCurves[$j] + ".curveOnSurface")`; $list[$listIndex] = $cos[0]; } else { $list[$listIndex] = $strokeCurves[$j]; } $listIndex++; } } return( $list ); } global proc string[] listAllCurveFromSurfaceNodes( ) { string $strokes[] = `listTransforms "-type stroke"`; string $list[]; int $i; int $listIndex = 0; for( $i = 0; $i < size( $strokes ); $i++ ) { string $strokeCurves[] = `listConnections ($strokes[$i]+".pathCurve")`; for($j = 0; $j < size( $strokeCurves ); $j++ ) { if( nodeType( $strokeCurves[$j] ) == "curveFromSurfaceCoS" ) { $list[$listIndex] = $strokeCurves[$j]; $listIndex++; } } } return( $list ); }