// =========================================================================== // 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. // =========================================================================== // // // // // plugNodeStripped(string $plug) // // // string Node name portion of the plug without namespace or dag path // // // This procedure returns the node name portion of the specified // plug, and strips off any dag path and/or namespace from the node. // // // string $plug The plug name from which to extract the node name // portion. // // // // Find the stripped node name portion of foo:joint1|joint2|joint3 // plugNodeStripped "foo:joint1|joint2|joint3" // // Result: joint3 // // // global proc string plugNodeStripped(string $plug) { string $buff[]; string $nodeName = `plugNode $plug`; tokenize($nodeName,":",$buff); $nodeName = $buff[size($buff)-1]; tokenize($nodeName,"|",$buff); $nodeName = $buff[size($buff)-1]; return $nodeName; }