// =========================================================================== // 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. // =========================================================================== // // Procedure Name: // selectedChannelBoxAttributes() // // Description: // Returns the list of all attributes that are // currently selected in the channel box. If no // attributes are selected, the returned string[] is // empty. // // Input Arguments: // None. // // Return Value: // String array of object attributes // global proc string[] selectedChannelBoxAttributes() { global string $gChannelBoxName; string $result[]; if( `channelBox -q -exists $gChannelBoxName` ) { string $main[]; string $shape[]; string $history[]; string $outputs[]; $main = `channelBox -q -selectedMainAttributes $gChannelBoxName`; $shape = `channelBox -q -selectedShapeAttributes $gChannelBoxName`; $history = `channelBox -q -selectedHistoryAttributes $gChannelBoxName`; $outputs = `channelBox -q -selectedOutputAttributes $gChannelBoxName`; string $attr; for( $attr in $main ) { $result[ size($result) ] = $attr; } for( $attr in $shape ) { $result[ size($result) ] = $attr; } for( $attr in $history ) { $result[ size($result) ] = $attr; } for( $attr in $outputs ) { $result[ size($result) ] = $attr; } } return $result; }