// SCRIPT: ijConnectionEditor // AUTHOR: Ian Jones - mel@shrtcww.com // DATE: September 1, 2005 // Version: 1.0 // // DESCRIPTION: Opens the connection editor and loads left/right side based on // a selection // // ASSUMPTIONS: Connection Editor is set to: from -> to // global proc ijConnectionEditor() { // Save the current selection/size string $selection[] = `ls -sl`; int $numSelections = `size($selection)`; ConnectionEditor; // If selection[0] exists: load to the left side of the CE if ( $numSelections > 0 )nodeOutliner -e -replace ( $selection[0] ) connectWindow|tl|cwForm|connectWindowPane|leftSideCW; // If selection[1] exists: load to the right side of the CE if ( $numSelections > 1 ) nodeOutliner -e -replace ( $selection[1] ) connectWindow|tl|cwForm|connectWindowPane|rightSideCW; // If more than 2 objects selected // add additional to the right side. if ( $numSelections > 1 ) for( $n=2; $n<($numSelections ); $n++ ) { nodeOutliner -e -addObject $selection[( $n )] connectWindow|tl|cwForm|connectWindowPane|rightSideCW; } }