Apr 2008
1 / 3
Apr 2008
Apr 2008

Hi ,

What is the MEL command for listing "Quick Sets" or "Quick Select Sets"

Thanks
Chayan

  • created

    Apr '08
  • last reply

    Apr '08
  • 2

    replies

  • 6.2k

    views

  • 1

    user

  • 1

    link

Theres actually no difference between a quick selection set and and other set types (they can all be used for quick selection a set is just a container and as a container quick selections dont differ form other container they are as fast too), tough sets created trough the menu as quick selection set have a type falag set to gCharacterSet to separate them form others (this is arbitrary you could have different kinds os quick selection sets if you wanted to).

CODE
ls -sets; //list all sets
ls -et objectSet; //just object sets

finally let us assemble a filter to do a search for gCharacterSet types. A filter is (more versatile and usefull isll show later how you can hook this to outliner):

CODE
//first lets define a proc that collects the data
global proc string[] allGCharacterSetNodes( string[] $name ){
  string $ret[];
  for ($item in ls -et objectSet)
     if (sets -q -text $item=="gCharacterSet") $ret[size($ret)]=$item;
  return $ret;
}

//lets make it a filter
itemFilter -ss "allGCharacterSetNodes" gCharacterSetNodes;

//now you can get them all with
lsThroughFilter gCharacterSetNodes;

//or you can just connect it to a exsisting editor ala:
{
tearOffPanel "Outliner" "outlinerPanel" false;
string $outliner = outlinerPanel -query -outlinerEditor
                   "outlinerPanel1"
;
outlinerEditor -edit -filter  gCharacterSetNodes
               $outliner;
}
//it doesnt have to be outliner mind you

now you could proceed with making a selection connection
that selects the contents of each set on click if you wish.