// =========================================================================== // 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: Nov 2003 // // Description: // Contains fns used in many artisan tool mel files. // // // Procedure Name: // getNodeNameFromAbsolutePath // // Description: // contains a fn to give the relative node name given the complete (absolute) name. // // Input Arguments: // absolute name of the node // Return Value: // relative( simple) name of the node. // global proc string getNodeNameFromAbsolutePath(string $path) { string $tmp[]; tokenize( $path, "|", $tmp ); int $pieces = size( $tmp ) ; if ( $pieces == 0 ) return $path ; // we could not break it down any furhter. else return ( $tmp[ $pieces - 1 ] ) ; }