// =========================================================================== // 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. // =========================================================================== global proc int itemComponentInfo( string $item, string $info[] ) { string $buffer[]; int $numTokens = `tokenize $item ".[]" $buffer`; $info[0] = $buffer[0]; if( $numTokens == 1 ){ return( 6 ); // surface } else if( $numTokens == 3 ){ $info[1] = $buffer[2]; string $t = $buffer[1]; if( $t == "vtx" ){ return( 2 ); // point }else if( $t == "e" ){ return( 3 ); // edge }else if( $t == "f" ){ return( 4 ); // face }else if( $t == "pt" ){ return( 7 ); // particle }else{ string $fmt = (uiRes("m_itemComponentInfo.kUnknownToken")); warning( `format -s $t $fmt` ); return( 0 ); } } else { string $fmt = (uiRes("m_itemComponentInfo.kBadNumTokens")); warning( `format -s $numTokens $fmt` ); return( 0 ); } }