PDA

View Full Version : selection


blackchicken
06-11-2005, 10:59 AM
Hello everybody..I have little problem. I Started 3d in 3ds max, but now I 1.5 years prefer maya. Some thing I hate. One of them is, when I have object hide in layers, and logical want work only with objest visible in screen, select one of my visible object want to inver selection......maya select all globaly, I don't want work with hidden layer...hidden is becouse I DONT WORK WITH HIM! , please is there some script which allow me to SELECT ALL and SELECT INVER only visible objects on screen??

mobeen
06-11-2005, 03:15 PM
Hello there I have done what you want. Just pass the argument true if you want to invert selection and false if you want selection.


proc string[] FilteredSelection(int $isInvert)
{
string $currSel[]=`ls -sl`;
string $filtered[];
string $current;
int $total=0;

for($current in $currSel)
{
//What layer does this bject belong to?
string $whichLayer = `objectLayer($current)` ;

//Is inverted selection toggled
if($isInvert == false)
{
if($whichLayer=="defaultLayer" || `getAttr ($whichLayer+".visibility")`==true)
$filtered[$total++]=$current;
else
continue;
}
else
{
if($whichLayer=="defaultLayer" || `getAttr ($whichLayer+".visibility")`==true)
continue;
else
$filtered[$total++]=$current;
}
}

return $filtered;
}

FilteredSelection(false);


Thanx
Mobeen

blackchicken
06-11-2005, 06:36 PM
thanks a lot man..I' ll try it...have a nice day...:)

CGTalk Moderation
06-11-2005, 06:36 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.