default.txt 493 B

12345678910111213141516171819202122232425
  1. proc string[] getSelectedLights()
  2. {
  3. string $selectedLights[];
  4. string $select[] = `ls -sl -dag -leaf`;
  5. for ( $shape in $select )
  6. {
  7. // Determine if this is a light.
  8. //
  9. string $class[] = getClassification( `nodeType $shape` );
  10. if ( ( `size $class` ) > 0 && ( "light" == $class[0] ) )
  11. {
  12. $selectedLights[ `size $selectedLights` ] = $shape;
  13. }
  14. }
  15. // Result is an array of all lights included in
  16. // current selection list.
  17. return $selectedLights;
  18. }